-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
51 lines (49 loc) · 1.42 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
x-workspace-source: &WORKSPACE_SOURCE "~/ws"
x-start-sh-source: &START_SH_SOURCE "~/dockerfiles/scripts/start.bash"
x-vscode-extensions-installer-source: &VSCODE_EXTENSIONS_INSTALLER_SOURCE "~/dockerfiles/scripts/install_vscode_extensions.sh"
services:
ws:
build:
context: .
dockerfile: Dockerfile
ipc: host
tty: true
privileged: true
environment:
DISPLAY: $DISPLAY
TERM: screen-256color
LANG: C.UTF-8
NVIDIA_DRIVER_CAPABILITIES: all
volumes:
- type: bind
source: /tmp/.X11-unix
target: /tmp/.X11-unix
- type: bind
source: *START_SH_SOURCE
target: /home/user/start.bash
- type: bind
source: *VSCODE_EXTENSIONS_INSTALLER_SOURCE
target: /home/user/install_vscode_extensions.sh
- type: bind
source: *WORKSPACE_SOURCE
target: /home/user/ws
- type: volume
source: apt-cache-apt-lists
target: /var/lib/apt/lists
- type: volume
source: apt-cache-apt-archives
target: /var/cache/apt/archives
working_dir: /home/user/ws
command: /bin/bash /home/user/start.bash
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
volumes:
apt-cache-apt-lists:
name: debian12-apt-cache-apt-lists
apt-cache-apt-archives:
name: debian12-apt-cache-apt-archives