diff --git a/.gitignore b/.gitignore index 0251df0..af704f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ notebooks .*.sw* +cuda.deb diff --git a/Makefile b/Makefile index 5cd969e..1a4d1d9 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,12 @@ up: run run: build docker compose up -build: jupyter/Dockerfile +build: jupyter/Dockerfile jupyter/cuda.deb docker compose build +jupyter/cuda.deb: + curl https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda-repo-debian11-12-0-local_12.0.0-525.60.13-1_amd64.deb -o cuda.deb + down: docker compose down diff --git a/jupyter/Dockerfile b/jupyter/Dockerfile index 8b494df..3be3bc1 100644 --- a/jupyter/Dockerfile +++ b/jupyter/Dockerfile @@ -5,23 +5,30 @@ RUN conda update -y -n base -c conda-forge conda RUN conda create -y --name jupyter python=3.10 -RUN CONDA_OVERRIDE_CUDA=11.8 \ +# CUDA toolkit 12.0 is not available in conda-forge, and my host OS has 12.0 +COPY cuda.deb /tmp +RUN dpkg -i /tmp/cuda.deb && rm /tmp/cuda.deb + +RUN CONDA_OVERRIDE_CUDA=12.0 \ conda install -n jupyter --quiet -y -c conda-forge \ jupyterlab \ - pandas \ - librosa \ - matplotlib \ - pyarrow \ - pillow \ keras \ - cudatoolkit=11.8 \ cudnn \ keras-tuner \ numpy \ h5py \ - tensorflow=2.14 \ + tensorflow=2.15 \ && /bin/true # only added to make the installed package lines consistent +RUN conda install -n jupyter --quiet -y -c conda-forge \ + pandas \ + librosa \ + matplotlib \ + pyarrow \ + pydot \ + pillow \ + && /bin/true # as above + SHELL ["conda", "run", "-n", "jupyter", "/bin/bash", "-c"] ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "jupyter" ] CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--port", "9001", "--no-browser", "--allow-root", "--LabApp.token=''", "--notebook-dir=/notebooks", "--ResourceUseDisplay.track_cpu_percent=True" ]