-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (65 loc) · 1.46 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
68
69
70
version: "2.3"
services:
django:
build: ./backend
image: nvidia/cuda:10.1-cudnn7-devel
# restart: on-failure
working_dir: /drf
# command: "sleep 50000"
command: sh -c "pip install -r requirements.txt && python3 manage.py makemigrations && python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
volumes:
- ./backend:/drf
networks:
- internal_net
# - redis
devices:
- /dev/nvidia0:/dev/nvidia0
- /dev/nvidiactl:/dev/nvidiactl
- /dev/nvidia-modeset:/dev/nvidia-modeset
container_name: Yango
react:
# build: ./react
image: node:12.2.0-alpine
volumes:
- ./frontend:/app
working_dir: /app
command: sh -c "npm i && npm start --host=0.0.0.0:3000"
environment:
- NODE_ENV=development
ports:
- "3000:3000"
networks:
- internal_net
container_name: React
postgres:
image: postgres:10.0-alpine
ports:
- "5432:5432"
networks:
- internal_net
env_file:
- postgres.env
volumes:
- postgres_vol
container_name: Postgres
# redis:
# image: redis:alpine
# restart: on-failure
# ports:
# - "6379:6379"
# volumes:
# - "redis:/redis_data"
# networks:
# - redis
# container_name: Redis
networks:
internal_net:
# redis:
volumes:
postgres_vol:
# redis: