-
Notifications
You must be signed in to change notification settings - Fork 105
RHOAIENG-10351: Split JupyterLab installation out of the user's venv, so that there's fewer dependencies that need to be aligned #728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
54223e7
255fae7
e07bba4
d38aac8
133279c
b62056f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,19 @@ LABEL name="odh-notebook-jupyter-datascience-ubi9-python-3.11" \ | |
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/datascience/ubi9-python-3.11" \ | ||
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-datascience-ubi9-python-3.11" | ||
|
||
WORKDIR /opt/app-root/opt | ||
COPY requirements-elyra.txt ./ | ||
RUN echo "Installing elyra" && \ | ||
export VIRTUAL_ENV=/opt/app-root/opt && \ | ||
(source $VIRTUAL_ENV/bin/activate && pip install --require-hashes -r requirements-elyra.txt) && \ | ||
rm -f ./requirements-elyra.txt && \ | ||
# Fix permissions to support pip in Openshift environments \ | ||
chmod -R g+w /opt/app-root/opt/lib/python${PYTHON_VERSION}/site-packages && \ | ||
fix-permissions /opt/app-root -P | ||
USER root | ||
RUN ln -s /opt/app-root/opt/bin/jupyter-elyra /usr/local/bin/jupyter-elyra | ||
USER default | ||
|
||
WORKDIR /opt/app-root/bin | ||
|
||
# Install Python packages and Jupyterlab extensions from Pipfile.lock | ||
|
@@ -34,9 +47,6 @@ USER root | |
# Install usefull OS packages | ||
RUN dnf install -y jq unixODBC postgresql git-lfs libsndfile && dnf clean all && rm -rf /var/cache/yum | ||
|
||
# Disable announcement plugin of jupyterlab | ||
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements" | ||
Comment on lines
-37
to
-38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we're running this as root on main, that's a mistake |
||
|
||
# Install MongoDB Client, We need a special repo for MongoDB as they do their own distribution | ||
COPY mongodb-org-6.0.repo-x86_64 /etc/yum.repos.d/mongodb-org-6.0.repo | ||
|
||
|
@@ -52,17 +62,18 @@ ENV PATH="$PATH:/opt/mssql-tools18/bin" | |
# Other apps and tools installed as default user | ||
USER 1001 | ||
|
||
# Disable announcement plugin of jupyterlab | ||
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements" | ||
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# setup path for runtime configuration | ||
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 && \ | ||
rm /opt/app-root/opt/share/jupyter/metadata/runtime-images/*.json && \ | ||
# Fix permissions to support pip in Openshift environments \ | ||
Comment on lines
70
to
72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
-rm /opt/app-root/opt/share/jupyter/metadata/runtime-images/*.json && \
+rm -f /opt/app-root/opt/share/jupyter/metadata/runtime-images/*.json || true && \ 🤖 Prompt for AI Agents
|
||
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 runtime-images/ /opt/app-root/opt/share/jupyter/metadata/runtime-images/ | ||
|
||
WORKDIR /opt/app-root/src |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -26,21 +26,9 @@ psycopg = "~=3.2.1" | |||||||||||||||
pyodbc = "~=5.1.0" | ||||||||||||||||
mysql-connector-python = "~=9.0.0" | ||||||||||||||||
|
||||||||||||||||
# JupyterLab packages | ||||||||||||||||
|
||||||||||||||||
odh-elyra = "==4.0.0" | ||||||||||||||||
|
||||||||||||||||
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.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" | ||||||||||||||||
# Jupyter kernel | ||||||||||||||||
# c.f. https://docs.jupyter.org/en/latest/install/kernels.html#how-do-i-install-python-2-and-python-3 | ||||||||||||||||
ipykernel = "~=6.29.5" | ||||||||||||||||
|
||||||||||||||||
Comment on lines
+29
to
32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Same jupyter-client issue as minimal image Add an 8.x upper-bound to avoid unvetted protocol changes: ipykernel = "~=6.29.5"
+jupyter-client = ">=8,<9" 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||
# Base packages | ||||||||||||||||
wheel = "~=0.44.0" | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the largest question right now; where to locate the other venv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/opt/app-root/opt
is poor choice