From 7ac06fd896cac69fc520bda913ee2a9e92eface3 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 12:21:42 -0700 Subject: [PATCH 01/22] Changed datascience image to install packages using uv --- images/datascience-notebook/Dockerfile | 42 +++++++++++++++++++------- images/spec.yml | 26 ++++++++-------- 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index f172251e..cf149259 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -67,26 +67,46 @@ USER jovyan ARG JUPYTERSERVER_VERSION=2.14.2 NBGRADER_VERSION=0.9.3 JUPYTERLAB_VERSION=4.2.4 NBCONVERT_VERSION=7.16.4 NOTEBOOK_VERSION=7.2.1 NBCLASSIC_VERSION=1.1.0 ARG PANDAS_VERSION=2.2.3 STATSMODELS_VERSION=0.14.4 BOTTLENECK_VERSION=1.4.2 NUMEXPR_VERSION=2.10.2 +# Install uv for faster package installations +RUN pip3 install --no-cache-dir --upgrade uv + # Install essential+datascience pip packages ## mistune added for nbgrader issues -RUN mamba install -c conda-forge pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn && \ - mamba install -c conda-forge nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune && \ - mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION && \ +# RUN mamba install -c conda-forge pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn && \ +# mamba install -c conda-forge nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune && \ +# mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION && \ +# python -c 'import matplotlib.pyplot' && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean --all + + +RUN uv pip install pillow typingextensions tzlocal appdirs gputil mock pytest umap-learn --system && \ + uv pip install nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune --system && \ + uv pip install dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION --system && \ python -c 'import matplotlib.pyplot' && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean --all + uv cache clean # Install jupyterlab+extensions -RUN mamba install -c conda-forge jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION && \ - mamba install -c conda-forge jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION && \ - # (TODO: Re-enable collab once RTC is fixed) mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals jupyter-collaboration && \ - mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals && \ - mamba install -c conda-forge jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson && \ - mamba install -c conda-forge nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION && \ +# RUN mamba install -c conda-forge jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION && \ +# mamba install -c conda-forge jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION && \ +# # (TODO: Re-enable collab once RTC is fixed) mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals jupyter-collaboration && \ +# mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals && \ +# mamba install -c conda-forge jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson && \ +# mamba install -c conda-forge nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean --all + +RUN uv pip install jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION --system && \ + uv pip install jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION --system $$ \ + uv pip install jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson --system && \ + uv pip install nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean --all + uv cache clean # Install R packages RUN mamba install -c conda-forge r-markdown r-covr r-git2r r-crosstalk r-dt -y && \ diff --git a/images/spec.yml b/images/spec.yml index 6add41e5..1827f5f1 100644 --- a/images/spec.yml +++ b/images/spec.yml @@ -9,23 +9,23 @@ images: JUPYTERHUB_VERSION: 4.1.5 info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] - rstudio-notebook: - image_name: ghcr.io/ucsd-ets/rstudio-notebook - depend_on: datascience-notebook - integration_tests: true - info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] - prune: true +# rstudio-notebook: +# image_name: ghcr.io/ucsd-ets/rstudio-notebook +# depend_on: datascience-notebook +# integration_tests: true +# info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] +# prune: true - scipy-ml-notebook: - image_name: ghcr.io/ucsd-ets/scipy-ml-notebook - depend_on: datascience-notebook - integration_tests: false - info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] - prune: false # comment if scipy-ml stops being the last container +# scipy-ml-notebook: +# image_name: ghcr.io/ucsd-ets/scipy-ml-notebook +# depend_on: datascience-notebook +# integration_tests: false +# info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] +# prune: false # comment if scipy-ml stops being the last container #prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. tag: - prefix: "2025.2" + prefix: "2025.3" all_info_cmds: PY_VER: From 7d0325651b32200b4f69b633ec3a7f509405e715 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 12:46:27 -0700 Subject: [PATCH 02/22] isntalled typing extensions using conda --- images/datascience-notebook/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index cf149259..e2807402 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -81,7 +81,12 @@ RUN pip3 install --no-cache-dir --upgrade uv # mamba clean --all -RUN uv pip install pillow typingextensions tzlocal appdirs gputil mock pytest umap-learn --system && \ +RUN mamba install -c conda-forge typingextensions && \ + fix-permissions $CONDA_DIR && \ + fix-permissions /home/$NB_USER && \ + mamba clean --all + +RUN uv pip install pillow tzlocal appdirs gputil mock pytest umap-learn --system && \ uv pip install nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune --system && \ uv pip install dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION --system && \ python -c 'import matplotlib.pyplot' && \ From dad123101a3b8929a1602dcb27998598528e092d Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 12:55:49 -0700 Subject: [PATCH 03/22] fixed typo --- images/datascience-notebook/Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index e2807402..ef608dbd 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -81,12 +81,7 @@ RUN pip3 install --no-cache-dir --upgrade uv # mamba clean --all -RUN mamba install -c conda-forge typingextensions && \ - fix-permissions $CONDA_DIR && \ - fix-permissions /home/$NB_USER && \ - mamba clean --all - -RUN uv pip install pillow tzlocal appdirs gputil mock pytest umap-learn --system && \ +RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn --system && \ uv pip install nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune --system && \ uv pip install dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION --system && \ python -c 'import matplotlib.pyplot' && \ From 4a1a35a36b20cfddf7140c07ddda37eaf32e6ebc Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 13:11:31 -0700 Subject: [PATCH 04/22] changed versioning from conda to pip --- images/datascience-notebook/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index ef608dbd..e4fb81e9 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -82,8 +82,8 @@ RUN pip3 install --no-cache-dir --upgrade uv RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn --system && \ - uv pip install nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune --system && \ - uv pip install dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION --system && \ + uv pip install nltk statsmodels==$STATSMODELS_VERSION pandas==$PANDAS_VERSION mistune --system && \ + uv pip install dpkt nose datascience pyarrow bottleneck==$BOTTLENECK_VERSION umap-learn numexpr==$NUMEXPR_VESION --system && \ python -c 'import matplotlib.pyplot' && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ @@ -100,10 +100,10 @@ RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest u # fix-permissions /home/$NB_USER && \ # mamba clean --all -RUN uv pip install jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION --system && \ - uv pip install jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION --system $$ \ +RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVER_VERSION --system && \ + uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system $$ \ uv pip install jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson --system && \ - uv pip install nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION --system && \ + uv pip install nbconvert==$NBCONVERT_VERSION nbgrader==$NBGRADER_VERSION --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ uv cache clean From eaa9894470cb14e055f4db4963665e5e740e5b3e Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 14:07:42 -0700 Subject: [PATCH 05/22] fixed typo --- images/datascience-notebook/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index e4fb81e9..f1a9a439 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -74,7 +74,7 @@ RUN pip3 install --no-cache-dir --upgrade uv ## mistune added for nbgrader issues # RUN mamba install -c conda-forge pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn && \ # mamba install -c conda-forge nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune && \ -# mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VESION && \ +# mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VERSION && \ # python -c 'import matplotlib.pyplot' && \ # fix-permissions $CONDA_DIR && \ # fix-permissions /home/$NB_USER && \ @@ -83,7 +83,7 @@ RUN pip3 install --no-cache-dir --upgrade uv RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn --system && \ uv pip install nltk statsmodels==$STATSMODELS_VERSION pandas==$PANDAS_VERSION mistune --system && \ - uv pip install dpkt nose datascience pyarrow bottleneck==$BOTTLENECK_VERSION umap-learn numexpr==$NUMEXPR_VESION --system && \ + uv pip install dpkt nose datascience pyarrow bottleneck==$BOTTLENECK_VERSION umap-learn numexpr==$NUMEXPR_VERSION --system && \ python -c 'import matplotlib.pyplot' && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ From 5775285332f8ca6de52d84ff33130305016c3d53 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 14:29:52 -0700 Subject: [PATCH 06/22] Redeclare JUPYTERHUB_VERSION after FROM call --- images/datascience-notebook/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index f1a9a439..dc276d71 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -64,7 +64,7 @@ USER jovyan # Python/Mamba Deps ## Package versions -ARG JUPYTERSERVER_VERSION=2.14.2 NBGRADER_VERSION=0.9.3 JUPYTERLAB_VERSION=4.2.4 NBCONVERT_VERSION=7.16.4 NOTEBOOK_VERSION=7.2.1 NBCLASSIC_VERSION=1.1.0 +ARG JUPYTERHUB_VERSION=4.1.5 JUPYTERSERVER_VERSION=2.14.2 NBGRADER_VERSION=0.9.3 JUPYTERLAB_VERSION=4.2.4 NBCONVERT_VERSION=7.16.4 NOTEBOOK_VERSION=7.2.1 NBCLASSIC_VERSION=1.1.0 ARG PANDAS_VERSION=2.2.3 STATSMODELS_VERSION=0.14.4 BOTTLENECK_VERSION=1.4.2 NUMEXPR_VERSION=2.10.2 # Install uv for faster package installations From f161c8674cb96f8b272749f537e87208a1f27bab Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 14:47:10 -0700 Subject: [PATCH 07/22] Small fix --- images/datascience-notebook/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index dc276d71..d825f7d2 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -102,6 +102,8 @@ RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest u RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVER_VERSION --system && \ uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system $$ \ + # (TODO: Re-enable collab once RTC is fixed) uv pip install jupyterlab_rise jupyter_server_terminals jupyter-collaboration --system && \ + uv pip install jupyterlab_rise jupyter_server_terminals --server && \ uv pip install jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson --system && \ uv pip install nbconvert==$NBCONVERT_VERSION nbgrader==$NBGRADER_VERSION --system && \ fix-permissions $CONDA_DIR && \ From 4025cf717bac1f073002b46a715bcd68dacf26ad Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 15:04:09 -0700 Subject: [PATCH 08/22] fixed typo --- images/datascience-notebook/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index d825f7d2..fd5f0181 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -103,7 +103,7 @@ RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest u RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVER_VERSION --system && \ uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system $$ \ # (TODO: Re-enable collab once RTC is fixed) uv pip install jupyterlab_rise jupyter_server_terminals jupyter-collaboration --system && \ - uv pip install jupyterlab_rise jupyter_server_terminals --server && \ + uv pip install jupyterlab_rise jupyter_server_terminals --system && \ uv pip install jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson --system && \ uv pip install nbconvert==$NBCONVERT_VERSION nbgrader==$NBGRADER_VERSION --system && \ fix-permissions $CONDA_DIR && \ From ff1cdb9fdafd967f6726dac3480c9a85149e8ba4 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 21 May 2025 15:14:33 -0700 Subject: [PATCH 09/22] fixed typo --- images/datascience-notebook/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index fd5f0181..78f46bf4 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -101,7 +101,7 @@ RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest u # mamba clean --all RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVER_VERSION --system && \ - uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system $$ \ + uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system && \ # (TODO: Re-enable collab once RTC is fixed) uv pip install jupyterlab_rise jupyter_server_terminals jupyter-collaboration --system && \ uv pip install jupyterlab_rise jupyter_server_terminals --system && \ uv pip install jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson --system && \ From 6df26d5a5ae80386514a9c124f1d7910af204bad Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Tue, 27 May 2025 10:50:15 -0700 Subject: [PATCH 10/22] Migrated scipy-ml to uv --- images/scipy-ml-notebook/Dockerfile | 55 ++++++++++++++++++++++------- images/spec.yml | 26 +++++++------- 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index 17ec040f..f3e3a950 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -67,20 +67,36 @@ RUN mamba install -c "nvidia/label/cuda-12.6.0" cuda-nvcc \ ## install protobuf to avoid weird base type error. seems like if we don't then it'll be installed twice. ## https://github.com/spesmilo/electrum/issues/7825 ## pip cache purge didnt work here for some reason. -RUN pip install --no-cache-dir protobuf==$PROTOBUF_VERSION +# RUN pip install --no-cache-dir protobuf==$PROTOBUF_VERSION + +RUN uv pip install --no-cache-dir protobuf==$PROTOBUF_VERSION --system && \ + fix-permissions $CONDA_DIR && \ + fix-permissions /home/$NB_USER && \ + uv cache clean + ## cuda-python installed to have parity with tensorflow and cudnn ## Install pillow<7 due to dependency issue https://github.com/pytorch/vision/issues/1712 ## tensorrt installed to fix not having libnvinfer that has caused tensorflow issues. -RUN pip install opencv-contrib-python-headless \ - opencv-python && \ +# RUN pip install opencv-contrib-python-headless \ +# opencv-python && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# pip cache purge + +RUN uv pip install opencv-contrib-python-headless opencv-python --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - pip cache purge + uv cache clean + +# RUN mamba install -c conda-forge pyqt pycocotools pillow scapy && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean --all -RUN mamba install -c conda-forge pyqt pycocotools pillow scapy && \ +RUN uv pip install pyqt pycocotools pillow scapy --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean --all + uv cache clean # Install CUDA/Torch/Tensorflow/Keras w/pip ## no purge required but no-cache-dir is used. pip purge will actually break the build here! @@ -88,18 +104,31 @@ RUN mamba install -c conda-forge pyqt pycocotools pillow scapy && \ ## Check tensorrt_env_vars.sh if you have to bump tensorrt! ## tf-keras is keras 2.x for higher versions of tensorflow that would normally require keras 3 -RUN pip install nvidia-cudnn-cu12==$CUDNN_VERSION torch==$TORCH_VERSION torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 && \ - pip install tensorflow==$TENSORFLOW_VERSION tensorflow-datasets tensorrt==$TENSORRT_VERSION keras==$KERAS_VERSION tf-keras==$TF_KERAS_VERSION && \ +# RUN pip install nvidia-cudnn-cu12==$CUDNN_VERSION torch==$TORCH_VERSION torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 && \ +# pip install tensorflow==$TENSORFLOW_VERSION tensorflow-datasets tensorrt==$TENSORRT_VERSION keras==$KERAS_VERSION tf-keras==$TF_KERAS_VERSION && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean -a -y && \ +# pip cache purge + +RUN uv pip install nvidia-cudnn-cu12==$CUDNN_VERSION torch==$TORCH_VERSION torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 --system && \ + uv pip install tensorflow==$TENSORFLOW_VERSION tensorflow-datasets tensorrt==$TENSORRT_VERSION keras==$KERAS_VERSION tf-keras==$TF_KERAS_VERSION --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ mamba clean -a -y && \ - pip cache purge + uv cache clean + +# RUN pip install transformers datasets accelerate huggingface-hub timm && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean -a -y && \ +# pip cache purge -RUN pip install transformers datasets accelerate huggingface-hub timm && \ +RUN uv pip install transformers datasets accelerate huggingface-hub timm --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ mamba clean -a -y && \ - pip cache purge + uv cache clean USER $NB_UID:$NB_GID ENV PATH=${PATH}:/usr/local/nvidia/bin:/opt/conda/bin @@ -113,8 +142,8 @@ RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \ # TensorRT fix for tensorflow ## https://github.com/tensorflow/tensorflow/issues/61468 (could not find TensorRT) ## This will most definitely have to be changed after 8.6.1... -RUN ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.$TENSORRT_VERSION && \ - ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.$TENSORRT_VERSION +# RUN ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.$TENSORRT_VERSION && \ +# ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.$TENSORRT_VERSION # Run datahub scripts RUN . /tmp/activate.sh diff --git a/images/spec.yml b/images/spec.yml index 1827f5f1..992eba02 100644 --- a/images/spec.yml +++ b/images/spec.yml @@ -1,13 +1,13 @@ root: datascience-notebook images: - datascience-notebook: - image_name: ghcr.io/ucsd-ets/datascience-notebook - build_args: - PYTHON_VERSION: python-3.11.8 - PY_VER_SHORT: "3.11" - JUPYTERHUB_VERSION: 4.1.5 - info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] +# datascience-notebook: +# image_name: ghcr.io/ucsd-ets/datascience-notebook +# build_args: +# PYTHON_VERSION: python-3.11.8 +# PY_VER_SHORT: "3.11" +# JUPYTERHUB_VERSION: 4.1.5 +# info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] # rstudio-notebook: # image_name: ghcr.io/ucsd-ets/rstudio-notebook @@ -16,12 +16,12 @@ images: # info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] # prune: true -# scipy-ml-notebook: -# image_name: ghcr.io/ucsd-ets/scipy-ml-notebook -# depend_on: datascience-notebook -# integration_tests: false -# info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] -# prune: false # comment if scipy-ml stops being the last container + scipy-ml-notebook: + image_name: ghcr.io/ucsd-ets/scipy-ml-notebook + depend_on: datascience-notebook + integration_tests: false + info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] + prune: false # comment if scipy-ml stops being the last container #prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. tag: From 923d524ef48e84cd72c58542dfdf03e9fb6956d3 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Tue, 27 May 2025 10:58:13 -0700 Subject: [PATCH 11/22] Removed commented out notebooks --- images/spec.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/images/spec.yml b/images/spec.yml index 992eba02..df99929c 100644 --- a/images/spec.yml +++ b/images/spec.yml @@ -1,20 +1,20 @@ root: datascience-notebook images: -# datascience-notebook: -# image_name: ghcr.io/ucsd-ets/datascience-notebook -# build_args: -# PYTHON_VERSION: python-3.11.8 -# PY_VER_SHORT: "3.11" -# JUPYTERHUB_VERSION: 4.1.5 -# info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] + datascience-notebook: + image_name: ghcr.io/ucsd-ets/datascience-notebook + build_args: + PYTHON_VERSION: python-3.11.8 + PY_VER_SHORT: "3.11" + JUPYTERHUB_VERSION: 4.1.5 + info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] -# rstudio-notebook: -# image_name: ghcr.io/ucsd-ets/rstudio-notebook -# depend_on: datascience-notebook -# integration_tests: true -# info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] -# prune: true + rstudio-notebook: + image_name: ghcr.io/ucsd-ets/rstudio-notebook + depend_on: datascience-notebook + integration_tests: true + info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] + prune: true scipy-ml-notebook: image_name: ghcr.io/ucsd-ets/scipy-ml-notebook From b886b54ad3a64d32d2922892e940a79452f99657 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Tue, 27 May 2025 11:19:27 -0700 Subject: [PATCH 12/22] Changed pyqt to PyQt5 --- images/scipy-ml-notebook/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index f3e3a950..8895c6ec 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -93,7 +93,7 @@ RUN uv pip install opencv-contrib-python-headless opencv-python --system && \ # fix-permissions /home/$NB_USER && \ # mamba clean --all -RUN uv pip install pyqt pycocotools pillow scapy --system && \ +RUN uv pip install PyQt5 pycocotools pillow scapy --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ uv cache clean From 3e51d4f8b3e2571f96491aba08d7a8e573ac15bb Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Tue, 27 May 2025 13:27:36 -0700 Subject: [PATCH 13/22] removed prepull from all notebooks --- images/spec.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/images/spec.yml b/images/spec.yml index df99929c..764eec03 100644 --- a/images/spec.yml +++ b/images/spec.yml @@ -8,6 +8,7 @@ images: PY_VER_SHORT: "3.11" JUPYTERHUB_VERSION: 4.1.5 info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] + prepull: false rstudio-notebook: image_name: ghcr.io/ucsd-ets/rstudio-notebook @@ -15,6 +16,7 @@ images: integration_tests: true info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] prune: true + prepull: false scipy-ml-notebook: image_name: ghcr.io/ucsd-ets/scipy-ml-notebook @@ -22,7 +24,7 @@ images: integration_tests: false info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] prune: false # comment if scipy-ml stops being the last container - #prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. + prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. tag: prefix: "2025.3" From dc915c4eb73368f441fe0e1fec2ea89033207ece Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 28 May 2025 11:49:10 -0700 Subject: [PATCH 14/22] Removed comments and migrated cuda to pip --- images/datascience-notebook/Dockerfile | 19 --------- images/scipy-ml-notebook/Dockerfile | 53 ++++++-------------------- images/spec.yml | 4 +- 3 files changed, 13 insertions(+), 63 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index 78f46bf4..8686f86d 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -72,15 +72,6 @@ RUN pip3 install --no-cache-dir --upgrade uv # Install essential+datascience pip packages ## mistune added for nbgrader issues -# RUN mamba install -c conda-forge pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn && \ -# mamba install -c conda-forge nltk statsmodels=$STATSMODELS_VERSION pandas=$PANDAS_VERSION mistune && \ -# mamba install -c conda-forge dpkt nose datascience pyarrow bottleneck=$BOTTLENECK_VERSION umap-learn numexpr=$NUMEXPR_VERSION && \ -# python -c 'import matplotlib.pyplot' && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean --all - - RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest umap-learn --system && \ uv pip install nltk statsmodels==$STATSMODELS_VERSION pandas==$PANDAS_VERSION mistune --system && \ uv pip install dpkt nose datascience pyarrow bottleneck==$BOTTLENECK_VERSION umap-learn numexpr==$NUMEXPR_VERSION --system && \ @@ -90,16 +81,6 @@ RUN uv pip install pillow typing-extensions tzlocal appdirs gputil mock pytest u uv cache clean # Install jupyterlab+extensions -# RUN mamba install -c conda-forge jupyterhub=$JUPYTERHUB_VERSION jupyter_server=$JUPYTERSERVER_VERSION && \ -# mamba install -c conda-forge jupyterlab=$JUPYTERLAB_VERSION notebook=$NOTEBOOK_VERSION nbclassic=$NBCLASSIC_VERSION && \ -# # (TODO: Re-enable collab once RTC is fixed) mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals jupyter-collaboration && \ -# mamba install -c conda-forge jupyterlab_rise jupyter_server_terminals && \ -# mamba install -c conda-forge jupyterlab-latex jupyterlab-git jupyterlab-fasta jupyterlab-geojson && \ -# mamba install -c conda-forge nbconvert=$NBCONVERT_VERSION nbgrader=$NBGRADER_VERSION && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean --all - RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVER_VERSION --system && \ uv pip install jupyterlab==$JUPYTERLAB_VERSION notebook==$NOTEBOOK_VERSION nbclassic==$NBCLASSIC_VERSION --system && \ # (TODO: Re-enable collab once RTC is fixed) uv pip install jupyterlab_rise jupyter_server_terminals jupyter-collaboration --system && \ diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index 8895c6ec..3a10e20a 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -53,22 +53,25 @@ USER jovyan # CUDA setup w/mamba ## TODO: Investigate this command, seems to duplicate cuda packages for nvidia (pypi + conda-forge). # cuda-toolkit is a skeleton package on CUDA 12, unlike CUDA <= 11 -RUN mamba install -c "nvidia/label/cuda-12.6.0" cuda-nvcc \ - cuda-toolkit=$CUDA_VERSION \ +# RUN mamba install -c "nvidia/label/cuda-12.6.0" cuda-nvcc \ +# cuda-toolkit=$CUDA_VERSION \ # For CUDA 11: cudatoolkit=$CUDA_VERSION \ - cuda-version=$CUDA_VERSION \ - nccl \ - -y && \ +# cuda-version=$CUDA_VERSION \ +# nccl \ +# -y && \ +# fix-permissions $CONDA_DIR && \ +# fix-permissions /home/$NB_USER && \ +# mamba clean -a -y + +RUN uv pip install nvidia-pyindex --system && \ + uv pip install nvidia-cuda-nvcc-cu12 nvidia-nccl-cu12 cuda-python --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean -a -y + uv cache clean # Install scipy pip packages ## install protobuf to avoid weird base type error. seems like if we don't then it'll be installed twice. ## https://github.com/spesmilo/electrum/issues/7825 -## pip cache purge didnt work here for some reason. -# RUN pip install --no-cache-dir protobuf==$PROTOBUF_VERSION - RUN uv pip install --no-cache-dir protobuf==$PROTOBUF_VERSION --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ @@ -77,22 +80,11 @@ RUN uv pip install --no-cache-dir protobuf==$PROTOBUF_VERSION --system && \ ## cuda-python installed to have parity with tensorflow and cudnn ## Install pillow<7 due to dependency issue https://github.com/pytorch/vision/issues/1712 ## tensorrt installed to fix not having libnvinfer that has caused tensorflow issues. -# RUN pip install opencv-contrib-python-headless \ -# opencv-python && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# pip cache purge - RUN uv pip install opencv-contrib-python-headless opencv-python --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ uv cache clean -# RUN mamba install -c conda-forge pyqt pycocotools pillow scapy && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean --all - RUN uv pip install PyQt5 pycocotools pillow scapy --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ @@ -104,30 +96,15 @@ RUN uv pip install PyQt5 pycocotools pillow scapy --system && \ ## Check tensorrt_env_vars.sh if you have to bump tensorrt! ## tf-keras is keras 2.x for higher versions of tensorflow that would normally require keras 3 -# RUN pip install nvidia-cudnn-cu12==$CUDNN_VERSION torch==$TORCH_VERSION torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 && \ -# pip install tensorflow==$TENSORFLOW_VERSION tensorflow-datasets tensorrt==$TENSORRT_VERSION keras==$KERAS_VERSION tf-keras==$TF_KERAS_VERSION && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean -a -y && \ -# pip cache purge - RUN uv pip install nvidia-cudnn-cu12==$CUDNN_VERSION torch==$TORCH_VERSION torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 --system && \ uv pip install tensorflow==$TENSORFLOW_VERSION tensorflow-datasets tensorrt==$TENSORRT_VERSION keras==$KERAS_VERSION tf-keras==$TF_KERAS_VERSION --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean -a -y && \ uv cache clean -# RUN pip install transformers datasets accelerate huggingface-hub timm && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean -a -y && \ -# pip cache purge - RUN uv pip install transformers datasets accelerate huggingface-hub timm --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ - mamba clean -a -y && \ uv cache clean USER $NB_UID:$NB_GID @@ -139,11 +116,5 @@ RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \ cp $CONDA_DIR/nvvm/libdevice/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ #CUDA 11: cp $CONDA_DIR/lib/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ -# TensorRT fix for tensorflow -## https://github.com/tensorflow/tensorflow/issues/61468 (could not find TensorRT) -## This will most definitely have to be changed after 8.6.1... -# RUN ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer_plugin.so.$TENSORRT_VERSION && \ -# ln -s /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.8 /opt/conda/lib/python3.11/site-packages/tensorrt_libs/libnvinfer.so.$TENSORRT_VERSION - # Run datahub scripts RUN . /tmp/activate.sh diff --git a/images/spec.yml b/images/spec.yml index 764eec03..c1b1eafc 100644 --- a/images/spec.yml +++ b/images/spec.yml @@ -8,7 +8,6 @@ images: PY_VER_SHORT: "3.11" JUPYTERHUB_VERSION: 4.1.5 info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] - prepull: false rstudio-notebook: image_name: ghcr.io/ucsd-ets/rstudio-notebook @@ -16,7 +15,6 @@ images: integration_tests: true info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] prune: true - prepull: false scipy-ml-notebook: image_name: ghcr.io/ucsd-ets/scipy-ml-notebook @@ -24,7 +22,7 @@ images: integration_tests: false info_cmds: [PY_VER, PIP_LIST, CUDA_VERSION, CONDA_INFO, CONDA_LIST, APT_PKG_LIST] prune: false # comment if scipy-ml stops being the last container - prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. + # prepull: false #-- uncomment to disable prepulling behavior for scipy-ml. gives you space on machine in exchange for build time. tag: prefix: "2025.3" From 781d494ad42d779a99bb8cabc85bfa60d3794553 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 28 May 2025 12:12:07 -0700 Subject: [PATCH 15/22] Added index-url --- images/scipy-ml-notebook/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index 3a10e20a..f53df78d 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -63,8 +63,7 @@ USER jovyan # fix-permissions /home/$NB_USER && \ # mamba clean -a -y -RUN uv pip install nvidia-pyindex --system && \ - uv pip install nvidia-cuda-nvcc-cu12 nvidia-nccl-cu12 cuda-python --system && \ +RUN uv pip install --extra-index-url https://pypi.nvidia.com nvidia-cuda-nvcc-cu12 nvidia-nccl-cu12 cuda-python --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ uv cache clean From 5b76494f73efe10ed87c15b95487f074104f73f9 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Wed, 28 May 2025 12:25:55 -0700 Subject: [PATCH 16/22] Commented out cuda conda fix --- images/scipy-ml-notebook/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index f53df78d..7e87a2a8 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -111,9 +111,9 @@ ENV PATH=${PATH}:/usr/local/nvidia/bin:/opt/conda/bin # CUDA fixes for CONDA ## Copy libdevice file to the required path -RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \ - cp $CONDA_DIR/nvvm/libdevice/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ - #CUDA 11: cp $CONDA_DIR/lib/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ +# RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \ +# cp $CONDA_DIR/nvvm/libdevice/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ +# #CUDA 11: cp $CONDA_DIR/lib/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ # Run datahub scripts RUN . /tmp/activate.sh From 324c5ed5500b02c1f99c9aabaa2ac1e9be35dbb9 Mon Sep 17 00:00:00 2001 From: kevinsun0904 Date: Thu, 29 May 2025 11:32:33 -0700 Subject: [PATCH 17/22] Removed comments --- images/scipy-ml-notebook/Dockerfile | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/images/scipy-ml-notebook/Dockerfile b/images/scipy-ml-notebook/Dockerfile index 7e87a2a8..bfad60a6 100644 --- a/images/scipy-ml-notebook/Dockerfile +++ b/images/scipy-ml-notebook/Dockerfile @@ -53,16 +53,6 @@ USER jovyan # CUDA setup w/mamba ## TODO: Investigate this command, seems to duplicate cuda packages for nvidia (pypi + conda-forge). # cuda-toolkit is a skeleton package on CUDA 12, unlike CUDA <= 11 -# RUN mamba install -c "nvidia/label/cuda-12.6.0" cuda-nvcc \ -# cuda-toolkit=$CUDA_VERSION \ - # For CUDA 11: cudatoolkit=$CUDA_VERSION \ -# cuda-version=$CUDA_VERSION \ -# nccl \ -# -y && \ -# fix-permissions $CONDA_DIR && \ -# fix-permissions /home/$NB_USER && \ -# mamba clean -a -y - RUN uv pip install --extra-index-url https://pypi.nvidia.com nvidia-cuda-nvcc-cu12 nvidia-nccl-cu12 cuda-python --system && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ @@ -109,11 +99,5 @@ RUN uv pip install transformers datasets accelerate huggingface-hub timm --syste USER $NB_UID:$NB_GID ENV PATH=${PATH}:/usr/local/nvidia/bin:/opt/conda/bin -# CUDA fixes for CONDA -## Copy libdevice file to the required path -# RUN mkdir -p $CONDA_DIR/lib/nvvm/libdevice && \ -# cp $CONDA_DIR/nvvm/libdevice/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ -# #CUDA 11: cp $CONDA_DIR/lib/libdevice.10.bc $CONDA_DIR/lib/nvvm/libdevice/ - # Run datahub scripts RUN . /tmp/activate.sh From 8284e2d9f9d73f9090624d9e910427464a214abf Mon Sep 17 00:00:00 2001 From: yifanzhu1121 Date: Sun, 10 Aug 2025 21:10:00 -0700 Subject: [PATCH 18/22] datascience-notebook: add r-sf; ensure modern sqlite for JupyterLab; keep conda lib on loader path --- images/datascience-notebook/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index 8686f86d..7fbcf63f 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -92,7 +92,7 @@ RUN uv pip install jupyterhub==$JUPYTERHUB_VERSION jupyter_server==$JUPYTERSERVE uv cache clean # Install R packages -RUN mamba install -c conda-forge r-markdown r-covr r-git2r r-crosstalk r-dt -y && \ +RUN mamba install -c conda-forge r-markdown r-covr r-git2r r-crosstalk r-dt r-sf -y && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER && \ mamba clean -a -y @@ -103,7 +103,9 @@ RUN /usr/share/datahub/scripts/install-python-all.sh && \ chmod -R +r /opt/conda/etc/jupyter/nbconfig # Disable the jupyterlab extensions manager -RUN jupyter labextension disable @jupyterlab/extensionmanager-extension +RUN mamba remove --force sqlite && \ + mamba install -y sqlite && \ + jupyter labextension disable @jupyterlab/extensionmanager-extension # Cleanup ## nbgrader requires these variables set to just run the notebook server From bb4583e861b69ef107058168c37484476c20d092 Mon Sep 17 00:00:00 2001 From: RockfordMankiniUCSD <92760584+RockfordMankiniUCSD@users.noreply.github.com> Date: Wed, 13 Aug 2025 16:55:37 -0700 Subject: [PATCH 19/22] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index beef33e0..2b37c41b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: with: mode: start github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - ec2-image-id: ami-079a0c9425d45e778 + ec2-image-id: ami-00bea05327004f12a ec2-instance-type: t3.2xlarge subnet-id: subnet-0c4a81ef57cf2ebe3 security-group-id: sg-01cb8c0cb0de3ba00 From 8751623d560f2f6603acadde800b7fb9ae83e919 Mon Sep 17 00:00:00 2001 From: RockfordMankiniUCSD <92760584+RockfordMankiniUCSD@users.noreply.github.com> Date: Wed, 13 Aug 2025 17:00:12 -0700 Subject: [PATCH 20/22] Update Dockerfile --- images/datascience-notebook/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index 7fbcf63f..fcda86b6 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -1,4 +1,4 @@ -# If you are building manually, pass PYTHON_VERSION/PY_VER_SHORT/JUPYTERHUB_VERSION with --build-arg +# If you are building manually, pass PYTHON_VERSION/PY_VER_SHORT/JUPYTERHUB_VERSION with --build-arg ARG PYTHON_VERSION=python-3.11.8 ARG PY_VER_SHORT=3.11 ARG JUPYTERHUB_VERSION=4.1.5 From 6b1edcbf72e96a7c247d36570a6bfbf959229dae Mon Sep 17 00:00:00 2001 From: RockfordMankiniUCSD <92760584+RockfordMankiniUCSD@users.noreply.github.com> Date: Wed, 13 Aug 2025 17:19:19 -0700 Subject: [PATCH 21/22] Update Dockerfile --- images/datascience-notebook/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index fcda86b6..74f588e2 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -103,9 +103,7 @@ RUN /usr/share/datahub/scripts/install-python-all.sh && \ chmod -R +r /opt/conda/etc/jupyter/nbconfig # Disable the jupyterlab extensions manager -RUN mamba remove --force sqlite && \ - mamba install -y sqlite && \ - jupyter labextension disable @jupyterlab/extensionmanager-extension +RUN jupyter labextension disable @jupyterlab/extensionmanager-extension # Cleanup ## nbgrader requires these variables set to just run the notebook server From 4cd836f92ac9fdc5a3d93e7c5959cdc39d0ba879 Mon Sep 17 00:00:00 2001 From: RockfordMankiniUCSD <92760584+RockfordMankiniUCSD@users.noreply.github.com> Date: Wed, 13 Aug 2025 17:33:48 -0700 Subject: [PATCH 22/22] Update Dockerfile --- images/datascience-notebook/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/datascience-notebook/Dockerfile b/images/datascience-notebook/Dockerfile index 74f588e2..932162c2 100644 --- a/images/datascience-notebook/Dockerfile +++ b/images/datascience-notebook/Dockerfile @@ -102,6 +102,9 @@ RUN /usr/share/datahub/scripts/install-python-all.sh && \ chown -R jovyan:users /opt/conda/etc/jupyter/nbconfig && \ chmod -R +r /opt/conda/etc/jupyter/nbconfig +RUN mamba remove --force libsqlite && \ + mamba install -y libsqlite==3.46.1 + # Disable the jupyterlab extensions manager RUN jupyter labextension disable @jupyterlab/extensionmanager-extension