-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
31 lines (31 loc) · 1.12 KB
/
docker-compose.yml
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
services:
dev-nvidia:
build:
context: ../src
dockerfile: ../pytorch_setup/dev.dockerfile # this is relative to the context defined above
args:
USER_ID: ${USER_ID}
GROUP_ID: ${GROUP_ID}
image: rif/pytorch:latest
container_name: rif_pytorch
network_mode: "host" # access to host's network
stdin_open: true # docker run -i
tty: true # docker run -t
privileged: true # Needed for /dev volume
runtime: nvidia
environment:
- DISPLAY=${DISPLAY} # Pass the display for GUI
- QT_X11_NO_MITSHM=1 # Needed by QT programs
- XAUTHORITY=/tmp/.docker.xauth
- USER_ID=${USER_ID}
- GROUP_ID=${GROUP_ID}
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
- TERM=xterm-256color # Enable terminal colors
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ../src:/home/dev/workspace/src
- ../data:/home/dev/data
- /dev/shm:/dev/shm
- /dev:/dev