Skip to content

Commit

Permalink
RHOAIENG-12535: Setup Jupyter 4 + Elyra environment on RHOAI/ODH (#701)
Browse files Browse the repository at this point in the history
* RHOAIENG-12535: Setup Jupyter 4 + Elyra environment on RHOAI/ODH

* Fix comments

* Change odh-elyra version to 4.0.0.dev0

* Update jupyter/trustyai/ubi9-python-3.11 Pipfile

* Update lock files

* Patch elyra kfp template with latest change for rocm-TensorFlow

Signed-off-by: Harshad Reddy Nalla <[email protected]>

* Copy utils folder in jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile

* Updated odh-elyra from 4.0.0.dev0 to 4.0.0.dev1

---------

Signed-off-by: Harshad Reddy Nalla <[email protected]>
Co-authored-by: Harshad Reddy Nalla <[email protected]>
  • Loading branch information
paulovmr and harshad16 authored Sep 24, 2024
1 parent 99bf5ce commit aa5049d
Show file tree
Hide file tree
Showing 16 changed files with 4,099 additions and 300 deletions.
37 changes: 9 additions & 28 deletions jupyter/datascience/ubi9-python-3.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ 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 @@ -53,35 +52,17 @@ 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 \
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 \
RUN mkdir /opt/app-root/runtimes && \
# 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 \
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
2 changes: 1 addition & 1 deletion jupyter/datascience/ubi9-python-3.11/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mysql-connector-python = "~=9.0.0"

# JupyterLab packages

#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
odh-elyra = "==4.0.0.dev1"

jupyterlab = "~=4.2.4"
jupyter-bokeh = "~=4.0.5"
Expand Down
687 changes: 641 additions & 46 deletions jupyter/datascience/ubi9-python-3.11/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jupyter/pytorch/ubi9-python-3.11/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mysql-connector-python = "~=9.0.0"

# JupyterLab packages

#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
odh-elyra = "==4.0.0.dev1"

jupyterlab = "~=4.2.4"
jupyter-bokeh = "~=4.0.5"
Expand Down
Loading

0 comments on commit aa5049d

Please sign in to comment.