Skip to content

Commit

Permalink
Merge pull request #687 from atheo89/RHOAIENG-11080
Browse files Browse the repository at this point in the history
Update major release of the the python packages on the jupyterlab notebooks
  • Loading branch information
openshift-merge-bot[bot] authored Sep 11, 2024
2 parents abb56dd + e0769d2 commit 4317cc1
Show file tree
Hide file tree
Showing 18 changed files with 7,131 additions and 12,151 deletions.
4 changes: 2 additions & 2 deletions base/ubi9-python-3.11/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ verify_ssl = true

[packages]
# Base packages
wheel = "~=0.43.0"
setuptools = "~=69.2.0"
wheel = "~=0.44.0"
setuptools = "~=74.1.2"

[requires]
python_version = "3.11"
14 changes: 7 additions & 7 deletions base/ubi9-python-3.11/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 29 additions & 25 deletions jupyter/datascience/ubi9-python-3.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ WORKDIR /opt/app-root/bin

# Install Python packages and Jupyterlab extensions from Pipfile.lock
COPY Pipfile.lock ./

# TO DO: Uncomment this lines when elyra compatibility with jupyterlab 4.2 is done
# Copy Elyra setup to utils so that it's sourced at startup
COPY setup-elyra.sh ./utils/
# COPY setup-elyra.sh ./utils/

RUN echo "Installing softwares and packages" && \
micropipenv install && \
Expand Down Expand Up @@ -51,33 +53,35 @@ ENV PATH="$PATH:/opt/mssql-tools18/bin"
# Other apps and tools installed as default user
USER 1001

# TO DO: Uncomment this lines when elyra compatibility with jupyterlab 4.2 is done
# setup path for runtime configuration
RUN mkdir /opt/app-root/runtimes && \
# switch to Data Science Pipeline \
cp utils/pipeline-flow.svg /opt/app-root/lib/python3.11/site-packages/elyra/static/icons/kubeflow.svg && \
sed -i "s/Kubeflow Pipelines/Data Science/g" /opt/app-root/lib/python3.11/site-packages/elyra/pipeline/runtime_type.py && \
sed -i "s/Kubeflow Pipelines/Data Science Pipelines/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
sed -i "s/kubeflow-service/data-science-pipeline-service/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
# switch to Data Science Pipeline in component catalog \
DIR_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-directory-catalog.json" && \
FILE_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-file-catalog.json" && \
URL_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/url-catalog.json" && \
tmp=$(mktemp) && \
jq '.properties.metadata.properties.runtime_type = input' $DIR_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $DIR_COMPONENT && \
jq '.properties.metadata.properties.runtime_type = input' $FILE_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $FILE_COMPONENT && \
jq '.properties.metadata.properties.runtime_type = input' $URL_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $URL_COMPONENT && \
sed -i "s/metadata.metadata.runtime_type/\"DATA_SCIENCE_PIPELINES\"/g" /opt/app-root/share/jupyter/labextensions/@elyra/pipeline-editor-extension/static/lib_index_js.*.js && \
# Remove Elyra logo from JupyterLab because this is not a pure Elyra image \
sed -i 's/widget\.id === \x27jp-MainLogo\x27/widget\.id === \x27jp-MainLogo\x27 \&\& false/' /opt/app-root/share/jupyter/labextensions/@elyra/theme-extension/static/lib_index_js.*.js && \
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
# Remove default Elyra runtime-images \
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
# Fix permissions to support pip in Openshift environments \
# RUN mkdir /opt/app-root/runtimes && \
# # switch to Data Science Pipeline \
# cp utils/pipeline-flow.svg /opt/app-root/lib/python3.11/site-packages/elyra/static/icons/kubeflow.svg && \
# sed -i "s/Kubeflow Pipelines/Data Science/g" /opt/app-root/lib/python3.11/site-packages/elyra/pipeline/runtime_type.py && \
# sed -i "s/Kubeflow Pipelines/Data Science Pipelines/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
# sed -i "s/kubeflow-service/data-science-pipeline-service/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
# # switch to Data Science Pipeline in component catalog \
# DIR_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-directory-catalog.json" && \
# FILE_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-file-catalog.json" && \
# URL_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/url-catalog.json" && \
# tmp=$(mktemp) && \
# jq '.properties.metadata.properties.runtime_type = input' $DIR_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $DIR_COMPONENT && \
# jq '.properties.metadata.properties.runtime_type = input' $FILE_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $FILE_COMPONENT && \
# jq '.properties.metadata.properties.runtime_type = input' $URL_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $URL_COMPONENT && \
# sed -i "s/metadata.metadata.runtime_type/\"DATA_SCIENCE_PIPELINES\"/g" /opt/app-root/share/jupyter/labextensions/@elyra/pipeline-editor-extension/static/lib_index_js.*.js && \
# # Remove Elyra logo from JupyterLab because this is not a pure Elyra image \
# sed -i 's/widget\.id === \x27jp-MainLogo\x27/widget\.id === \x27jp-MainLogo\x27 \&\& false/' /opt/app-root/share/jupyter/labextensions/@elyra/theme-extension/static/lib_index_js.*.js && \
# # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
RUN sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
# TO DO: Uncomment this lines when elyra compatibility with jupyterlab 4.2 is done
# # Remove default Elyra runtime-images \
# rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
# # Fix permissions to support pip in Openshift environments \
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
fix-permissions /opt/app-root -P

# Copy Elyra runtime-images definitions and set the version
COPY runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/
# # Copy Elyra runtime-images definitions and set the version
# COPY runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/

WORKDIR /opt/app-root/src
63 changes: 31 additions & 32 deletions jupyter/datascience/ubi9-python-3.11/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,43 @@ name = "pypi"

[packages]
# Datascience and useful extensions
boto3 = "~=1.34.50"
boto3 = "~=1.35.14"
kafka-python = "~=2.0.2"
matplotlib = "~=3.8.3"
numpy = "~=1.26.4"
pandas = "~=2.2.0"
plotly = "~=5.20.0"
scikit-learn = "~=1.4.0"
scipy = "~=1.12.0"
skl2onnx = "~=1.16.0"
onnxconverter-common = "~=1.13.0" # Required for skl2onnx, as upgraded version is not compatible with protobuf
codeflare-sdk = "~=0.19.1"
memray = "~=1.10.0" # any version above this would cause issue with rich package
matplotlib = "~=3.9.2"
numpy = "~=2.1.0"
pandas = "~=2.2.2"
plotly = "~=5.23.0"
scikit-learn = "~=1.5.1"
scipy = "~=1.14.1"
skl2onnx = "~=1.17.0"
onnxconverter-common = "~=1.14.0" # Required for skl2onnx, as upgraded version is not compatible with protobuf
codeflare-sdk = "~=0.18.0"

# DB connectors
pymongo = "~=4.6.2"
psycopg = "~=3.1.18"
pymongo = "~=4.8.0"
psycopg = "~=3.2.1"
pyodbc = "~=5.1.0"
mysql-connector-python = "~=8.3.0"
mysql-connector-python = "~=9.0.0"

# JupyterLab packages
odh-elyra = "~=3.16.7"
jupyterlab = "~=3.6.7" # Wait on upgrade till plugins are ready
jupyter-bokeh = "~=3.0.7" # Upgrade would bring in jupyterlab 4
jupyter-server = "~=2.13.0"
jupyter-server-proxy = "~=4.0.0" # Upgrade would bring in jupyterlab 4

#odh-elyra = ">=3.16.7" # For the phase 1, exclude elyra installation. Till this Jira ticket is resolved. https://issues.redhat.com/browse/RHOAIENG-10143

jupyterlab = "~=4.2.4"
jupyter-bokeh = "~=4.0.5"
jupyter-server = "~=2.14.2"
jupyter-server-proxy = "~=4.3.0"
jupyter-server-terminals = "~=0.5.3"
jupyterlab-git = "~=0.44.0"
jupyterlab-lsp = "~=4.2.0"
jupyterlab-widgets = "~=3.0.10"
jupyter-resource-usage = "~=0.7.2"
nbdime = "~=3.2.1"
nbgitpuller = "~=1.2.0"
# pycodestyle is dependency of below packages
# and to achieve compatible of pycodestyle with python-lsp-server[all]
# pinned the below packages
autopep8 = "~=2.0.4"
flake8 = "~=7.0.0"
jupyterlab-git = "~=0.50.1"
jupyterlab-lsp = "~=5.1.0"
jupyterlab-widgets = "~=3.0.13"
jupyter-resource-usage = "~=1.1.0"
nbdime = "~=4.0.1"
nbgitpuller = "~=1.2.1"

# Base packages
wheel = "~=0.43.0"
setuptools = "~=69.2.0"
wheel = "~=0.44.0"
setuptools = "~=74.1.2"

[requires]
python_version = "3.11"
Loading

0 comments on commit 4317cc1

Please sign in to comment.