-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (36 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
37 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3.8'
services:
jupyterlab:
container_name: jupyter-cuda
user: root
image: nvidia/cuda:12.6.2-devel-ubuntu22.04
restart: always
environment:
- NVIDIA_VISIBLE_DEVICES=all
- JUPYTER_TOKEN=token
- NB_USER=jupyternb
- NB_UID=1000
- NB_GID=100
- CHOWN_HOME=yes
volumes:
- ../gpu-python:/home/jupyternb
working_dir: /home/jupyternb
ports:
- '8888:8888'
command: >
bash -c "
apt-get update &&
apt-get install -y python3 python3-pip &&
pip3 install --upgrade pip &&
pip3 install jupyterlab numpy numba matplotlib cupy-cuda12x nvmath-python numba_cuda pandas pynvml &&
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 &&
pip3 install cudf-cu12 cuml-cu12 dask-cuda dask-cudf-cu12 dask aiohttp requests nvidia-libmathdx-cu12 --extra-index-url=https://pypi.nvidia.com &&
ln -s /usr/local/cuda*/nvvm/lib64/libnvvm.so /usr/lib/libnvvm.so || true &&
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token=''"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]