Skip to content

Commit

Permalink
try python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
RockfordMankiniUCSD committed Oct 27, 2023
1 parent fcd709a commit 6eea1f8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions images/datascience-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=python-3.9.5
ARG PYTHON_VERSION=python-3.11
FROM jupyter/datascience-notebook:$PYTHON_VERSION
# coerce change in all notebook
USER root
Expand Down Expand Up @@ -48,7 +48,7 @@ COPY /test/test_r_func.R /opt/manual_tests

USER jovyan

ARG PY_VER_SHORT=3.9
ARG PY_VER_SHORT=3.11
ARG JUPYTERHUB_VERSION=3.0.0

# mistune added for nbgrader issues
Expand Down
22 changes: 11 additions & 11 deletions images/scipy-ml-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,24 @@ RUN pip install datascience \
# Beware of potentially needing to update these if we update the drivers.
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \
pip cache purge && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_cnn_infer.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcublasLt.so.11 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_adv_infer.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_adv_train.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_cnn_train.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_ops_infer.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_ops_train.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcublas.so.11
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_cnn_infer.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcublasLt.so.11 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_adv_infer.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_adv_train.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_cnn_train.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_ops_infer.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcudnn_ops_train.so.8 && \
rm /opt/conda/lib/python3.11/site-packages/torch/lib/libcublas.so.11

USER $NB_UID:$NB_GID
ENV PATH=${PATH}:/usr/local/nvidia/bin:/opt/conda/bin

#ENV CUDNN_PATH=/opt/conda/lib/python3.9/site-packages/nvidia/cudnn
#ENV CUDNN_PATH=/opt/conda/lib/python3.11/site-packages/nvidia/cudnn

# starts like this: /opt/conda/pkgs/cudnn-8.6.0.163-pypi_0 8.8.1.3-pypi_0/lib/:/opt/conda/pkgs/cudatoolkit-11.8.0-h37601d7_11/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
# need to have the end result of running 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.9/site-packages/nvidia/cudnn/lib'
# need to have the end result of running 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/nvidia/cudnn/lib'
# then the gpu can be detected via CLI.
#ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/python3.9/site-packages/nvidia/cudnn/lib
#ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/python3.11/site-packages/nvidia/cudnn/lib

# Do some CONDA/CUDA stuff
# Copy libdevice file to the required path
Expand Down
2 changes: 1 addition & 1 deletion images/scipy-ml-notebook/cudnn_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# set systemwide env variables for Conda package: cudnn
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/python3.9/site-packages/nvidia/cudnn/lib
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/python3.11/site-packages/nvidia/cudnn/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDNN_PATH}/lib
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
"version": ".5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion images/scipy-ml-notebook/tensorrt_env_vars.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

# put tensorrt lib into LD_LIBRARY_PATH
export LD_LIBRARY_PATH="/opt/conda/lib/python3.9/site-packages/tensorrt:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/opt/conda/lib/python3.11/site-packages/tensorrt:$LD_LIBRARY_PATH"
4 changes: 2 additions & 2 deletions images/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ images:
datascience-notebook:
image_name: ghcr.io/ucsd-ets/datascience-notebook
build_args:
PYTHON_VERSION: python-3.9.5
PY_VER_SHORT: "3.9"
PYTHON_VERSION: python-3.11
PY_VER_SHORT: "3.11"
JUPYTERHUB_VERSION: 1.4.1
info_cmds: [PY_VER, PIP_LIST, CONDA_INFO, CONDA_LIST, APT_PKG_LIST]

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def build(node: Node) -> Tuple[bool, str]:
cache_from=[node.full_image_name, node.stable_image_name]
):
# line is of type dict
content_str = line.get('stream', '').strip() # sth like 'Step 1/20 : ARG PYTHON_VERSION=python-3.9.5'
content_str = line.get('stream', '').strip() # sth like 'Step 1/20 : ARG PYTHON_VERSION=python-3.11'
if content_str: # if not empty string
# time each major step (Step 1/23 : xxx)
if content_str[:4] == "Step":
Expand Down
2 changes: 1 addition & 1 deletion scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def build_and_test_containers(
'images': {
'datascience-notebook': {
'build_args': {
'PYTHON_VERSION': 'python-3.9.5'
'PYTHON_VERSION': 'python-3.11'
},
'info_cmds': [
'PY_VER',
Expand Down

0 comments on commit 6eea1f8

Please sign in to comment.