Skip to content

Commit

Permalink
Update all the python packages on the jupyter notebooks as well as th…
Browse files Browse the repository at this point in the history
…e dockerfile on the cuda layer

Remove jupyterlab-s3-browser from datascience notebook

Add skl2onnx, codeflare-sdk, pymongo, psycopg, mysql-connector-python, pyodbc python packages on the jupyter notebooks except minimal

Install unixODBC in favor of pyodbc package

Install cuda toolkit on c9s cuda base

Update runtimes' python packages

Upgrade packages on the ubi8 flavor of the notebooks

Move installation of usefull os packages like jq unixODBC postgreql git-lfs libsndfile on the base image

Upgrade packages on trustyAI ubi8

Add mongodb and mssql drivers on datascience notebook

Consider setuptool on the pipfiles of the notebooks
  • Loading branch information
atheo89 authored and harshad16 committed Oct 6, 2023
1 parent a68b5e3 commit 2b3f608
Show file tree
Hide file tree
Showing 50 changed files with 22,000 additions and 7,018 deletions.
4 changes: 3 additions & 1 deletion base/c9s-python-3.9/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ verify_ssl = true
[dev-packages]

[packages]
wheel = "~=0.38.4"
# Base packages
wheel = "~=0.41.2"
setuptools = "~=68.1.2"

[requires]
python_version = "3.9"
16 changes: 12 additions & 4 deletions base/c9s-python-3.9/Pipfile.lock

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

4 changes: 3 additions & 1 deletion base/ubi8-python-3.8/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ verify_ssl = true
[dev-packages]

[packages]
wheel = "~=0.38.4"
# Base packages
wheel = "~=0.41.2"
setuptools = "~=68.1.2"

[requires]
python_version = "3.8"
16 changes: 12 additions & 4 deletions base/ubi8-python-3.8/Pipfile.lock

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

4 changes: 3 additions & 1 deletion base/ubi9-python-3.9/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ verify_ssl = true
[dev-packages]

[packages]
wheel = "~=0.38.4"
# Base packages
wheel = "~=0.41.2"
setuptools = "~=68.1.2"

[requires]
python_version = "3.9"
16 changes: 12 additions & 4 deletions base/ubi9-python-3.9/Pipfile.lock

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

9 changes: 4 additions & 5 deletions codeserver/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

ARG CODESERVER_VERSION=v4.11.0
ARG CODESERVER_VERSION=v4.16.1

LABEL name="odh-notebook-code-server-c9s-python-3.9" \
summary="Code Server (VS Code) image with python 3.9 based on CentOS Stream 9" \
Expand All @@ -22,8 +22,8 @@ RUN yum install -y "https://github.com/coder/code-server/releases/download/${COD
yum -y clean all --enablerepo='*'

# Install NGINX to proxy VSCode and pass probes check
ENV NGINX_VERSION=1.20 \
NGINX_SHORT_VER=120 \
ENV NGINX_VERSION=1.22 \
NGINX_SHORT_VER=122 \
NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
NGINX_CONF_PATH=/etc/nginx/nginx.conf \
NGINX_DEFAULT_CONF_PATH=${APP_ROOT}/etc/nginx.default.d \
Expand All @@ -34,7 +34,7 @@ ENV NGINX_VERSION=1.20 \

# Modules does not exist
RUN yum install -y https://download.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
INSTALL_PKGS="nss_wrapper bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl fcgiwrap initscripts chkconfig" && \
INSTALL_PKGS="bind-utils nginx nginx-mod-stream nginx-mod-http-perl fcgiwrap initscripts chkconfig" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
# spawn-fcgi is not in epel9 \
Expand Down Expand Up @@ -77,7 +77,6 @@ COPY nginx/serverconf/ /opt/app-root/etc/nginx.default.d/
COPY nginx/httpconf/ /opt/app-root/etc/nginx.d/
COPY nginx/api/ /opt/app-root/api/


# Launcher
COPY utils utils/
COPY run-code-server.sh run-nginx.sh ./
Expand Down
9 changes: 4 additions & 5 deletions codeserver/c9s-python-3.9/run-code-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ source ${SCRIPT_DIR}/utils/*.sh
run-nginx.sh &
spawn-fcgi -s /var/run/fcgiwrap.socket -M 766 /usr/sbin/fcgiwrap

# Create .bashrc if not present
if [ ! -f /opt/app-root/src/.bashrc ]
then
touch /opt/app-root/src/.bashrc
# Add .bashrc for custom promt if not present
if [ ! -f "/opt/app-root/src/.bashrc" ]; then
echo 'PS1="\[\033[34;1m\][\$(pwd)]\[\033[0m\]\n\[\033[1;0m\]$ \[\033[0m\]"' > /opt/app-root/src/.bashrc
fi

# Initilize access logs for culling
Expand All @@ -23,4 +22,4 @@ start_process /usr/bin/code-server \
--disable-telemetry \
--auth none \
--disable-update-check \
/opt/app-root/src
/opt/app-root/src
10 changes: 6 additions & 4 deletions cuda/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USER 0
WORKDIR /opt/app-root/bin

ENV NVARCH x86_64
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=510,driver<511 brand=unknown,driver>=510,driver<511 brand=nvidia,driver>=510,driver<511 brand=nvidiartx,driver>=510,driver<511 brand=geforce,driver>=510,driver<511 brand=geforcertx,driver>=510,driver<511 brand=quadro,driver>=510,driver<511 brand=quadrortx,driver>=510,driver<511 brand=titan,driver>=510,driver<511 brand=titanrtx,driver>=510,driver<511 brand=tesla,driver>=515,driver<516 brand=unknown,driver>=515,driver<516 brand=nvidia,driver>=515,driver<516 brand=nvidiartx,driver>=515,driver<516 brand=geforce,driver>=515,driver<516 brand=geforcertx,driver>=515,driver<516 brand=quadro,driver>=515,driver<516 brand=quadrortx,driver>=515,driver<516 brand=titan,driver>=515,driver<516 brand=titanrtx,driver>=515,driver<516"
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471"
ENV NV_CUDA_CUDART_VERSION 11.8.89-1

COPY cuda.repo-x86_64 /etc/yum.repos.d/cuda.repo
Expand Down Expand Up @@ -103,7 +103,7 @@ ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs

# Install CUDA devel cudnn8 from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.8.0/ubi8/devel/cudnn8/Dockerfile
ENV NV_CUDNN_VERSION 8.7.0.84-1
ENV NV_CUDNN_VERSION 8.9.0.131-1
ENV NV_CUDNN_PACKAGE libcudnn8-${NV_CUDNN_VERSION}.cuda11.8
ENV NV_CUDNN_PACKAGE_DEV libcudnn8-devel-${NV_CUDNN_VERSION}.cuda11.8

Expand All @@ -115,9 +115,11 @@ RUN yum install -y \
&& yum clean all \
&& rm -rf /var/cache/yum/*

# Install CUDA toolkit 11-8
# Install CUDA toolkit 11.8
RUN yum -y install cuda-toolkit-11-8 && \
yum -y clean all --enablerepo='*'
yum -y clean all --enablerepo="*"

# Set this flag so that libraries can find the location of CUDA
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda

# Restore notebook user workspace
Expand Down
7 changes: 5 additions & 2 deletions cuda/ubi9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USER 0
WORKDIR /opt/app-root/bin

ENV NVARCH x86_64
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=510,driver<511 brand=unknown,driver>=510,driver<511 brand=nvidia,driver>=510,driver<511 brand=nvidiartx,driver>=510,driver<511 brand=geforce,driver>=510,driver<511 brand=geforcertx,driver>=510,driver<511 brand=quadro,driver>=510,driver<511 brand=quadrortx,driver>=510,driver<511 brand=titan,driver>=510,driver<511 brand=titanrtx,driver>=510,driver<511 brand=tesla,driver>=515,driver<516 brand=unknown,driver>=515,driver<516 brand=nvidia,driver>=515,driver<516 brand=nvidiartx,driver>=515,driver<516 brand=geforce,driver>=515,driver<516 brand=geforcertx,driver>=515,driver<516 brand=quadro,driver>=515,driver<516 brand=quadrortx,driver>=515,driver<516 brand=titan,driver>=515,driver<516 brand=titanrtx,driver>=515,driver<516"
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.8 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471"
ENV NV_CUDA_CUDART_VERSION 11.8.89-1

COPY cuda.repo-x86_64 /etc/yum.repos.d/cuda.repo
Expand Down Expand Up @@ -70,6 +70,9 @@ RUN yum install -y \
&& yum clean all \
&& rm -rf /var/cache/yum/*

# Set this flag so that libraries can find the location of CUDA
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda

# Install CUDA devel from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.8.0/ubi8/devel/Dockerfile
ENV NV_CUDA_LIB_VERSION 11.8.0-1
Expand Down Expand Up @@ -103,7 +106,7 @@ ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs

# Install CUDA devel cudnn8 from:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.8.0/ubi8/devel/cudnn8/Dockerfile
ENV NV_CUDNN_VERSION 8.7.0.84-1
ENV NV_CUDNN_VERSION 8.9.0.131-1
ENV NV_CUDNN_PACKAGE libcudnn8-${NV_CUDNN_VERSION}.cuda11.8
ENV NV_CUDNN_PACKAGE_DEV libcudnn8-devel-${NV_CUDNN_VERSION}.cuda11.8

Expand Down
21 changes: 18 additions & 3 deletions jupyter/datascience/ubi8-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,25 @@ RUN echo "Installing softwares and packages" && \

COPY utils ./utils/

# OS Packages needs to be installed as root
USER root
RUN dnf install -y jq

# Install usefull OS packages
RUN dnf install -y jq unixODBC git-lfs libsndfile

# 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

RUN dnf install -y mongocli

# Install MSSQL Client, We need a special repo for MSSQL as they do their own distribution
COPY mssql-2022.repo-x86_64 /etc/yum.repos.d/mssql-2022.repo

RUN ACCEPT_EULA=Y dnf install -y mssql-tools18 unixODBC-devel

ENV PATH="$PATH:/opt/mssql-tools18/bin"

# Other apps and tools installed as default user
USER 1001

# setup path for runtime configuration
Expand All @@ -48,8 +65,6 @@ RUN mkdir /opt/app-root/runtimes && \
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 && \
# Explicitly enable jupyterlab_s3_browser plugin \
jupyter serverextension enable --py jupyterlab_s3_browser && \
# 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 \
Expand Down
53 changes: 30 additions & 23 deletions jupyter/datascience/ubi8-python-3.8/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,42 @@ name = "pypi"

[packages]
# Datascience and useful extensions
elyra-pipeline-editor-extension = "~=3.15.0"
elyra-python-editor-extension = "~=3.15.0"
elyra-code-snippet-extension = "~=3.15.0"
kfp-tekton = "<1.6.0"

boto3 = "~=1.26.69"
jupyter-bokeh = "~=3.0.5"
boto3 = "~=1.28.41"
kafka-python = "~=2.0.2"
matplotlib = "~=3.6.3"
numpy = "~=1.24.1"
numpy = "~=1.24.3"
pandas = "~=1.5.3"
plotly = "~=5.13.0"
scikit-learn = "~=1.2.1"
plotly = "~=5.16.1"
scikit-learn = "~=1.3.0"
scipy = "~=1.10.0"
jupyterlab-lsp = "~=3.10.2"
jupyterlab-widgets = "~=3.0.5"
jupyter-resource-usage = "~=0.6.0"
jupyterlab-s3-browser = "~=0.10.1"
skl2onnx = "~=1.15.0"
codeflare-sdk = "~=0.7.0"
# DB connectors
pymongo = "~=4.5.0"
psycopg = "~=3.1.10"
pyodbc = "~=4.0.39"
mysql-connector-python = "~=8.0.33"

# Parent image requirements to maintain cohesion
jupyterlab = "~=3.5.3"
jupyter-server = "~=2.1.0"
jupyter-server-proxy = "~=3.2.2"
# JupyterLab packages
elyra-pipeline-editor-extension = ">=3.15.0"
elyra-python-editor-extension = ">=3.15.0"
elyra-code-snippet-extension = ">=3.15.0"
kfp-tekton = "<1.6.0"
jupyterlab = "~=3.6.5"
jupyter-bokeh = "~=3.0.7"
jupyter-server = "~=2.7.3"
jupyter-server-proxy = "~=4.0.0"
jupyter-server-terminals = "~=0.4.4"
jupyterlab-git = "~=0.41.0"
nbdime = "~=3.1.1"
nbgitpuller = "~=1.1.1"
# ---
wheel = "~=0.38.4"
jupyterlab-git = "~=0.42.0"
jupyterlab-lsp = "~=4.2.0"
jupyterlab-widgets = "~=3.0.8"
jupyter-resource-usage = "~=0.6.0"
nbdime = "~=3.2.1"
nbgitpuller = "~=1.2.0"

# Base packages
wheel = "~=0.41.2"
setuptools = "~=68.1.2"

[requires]
python_version = "3.8"
Loading

0 comments on commit 2b3f608

Please sign in to comment.