Setting the CUDA toolkit to match my host OS
This commit is contained in:
parent
a3ea386b7c
commit
f335235b28
3 changed files with 20 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
notebooks
|
||||
.*.sw*
|
||||
cuda.deb
|
||||
|
|
|
|||
5
Makefile
5
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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" ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue