-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (65 loc) · 1.6 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.8'
name: car_racing
services:
car_racing:
image: devcontainer
build:
context: .
dockerfile: Dockerfile
container_name: pytorch_racing
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
environment:
- DISPLAY=`echo $DISPLAY | sed 's/^[^:]*\(.*\)/172.17.0.1\1/'`
- NVIDIA_DRIVER_CAPABILITIES=all
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_REQUIRE_CUDA=cuda>=12.1
- QT_X11_NO_MITSHM=1
volumes:
- ${PROJECT_PATH}:/home/docker/car_racing
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- $HOME/.Xauthority:/root/.Xauthority
# networks:
# - postgres_network
env_file: .env
# network_mode: host
stdin_open: true # docker run -i
tty: true # docker run -t
# ports:
# - 4000:4000
entrypoint: /bin/bash
# depends_on:
# - postgres_db
# postgres_db:
# image: postgres:16
# container_name: postgres_db
# restart: unless-stopped
# environment:
# - POSTGRES_DB=car_racing_db
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=postgres
# deploy:
# resources:
# limits:
# cpus: '1'
# memory: 2GB
# ports:
# - 5100:5432
# expose:
# - 5100
# volumes:
# - ${PROJECT_PATH}/postgres/db:/var/lib/postgresql/data
# - ${PROJECT_PATH}/postgres/sql:/docker-entrypoint-initdb.d
# networks:
# - postgres_network
# env_file: .env
# networks:
# postgres_network:
# driver: bridge
# volumes:
# postgres_db:
# external: true