-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcuda.docker-compose.yml
45 lines (45 loc) · 1.04 KB
/
cuda.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
version: "3.9"
services:
streamlit:
container_name: streamlit
build:
context: ./app
dockerfile: cuda.Dockerfile
depends_on:
- postgres
restart: on-failure
volumes:
- ./app/.streamlit:/root/.streamlit
- ./app/tmp:/app/tmp
- ./streamlit-volume:/streamlit-volume
env_file:
- .env
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=postgres
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
ports:
- ${SERVER_ADDR}:${HOST_PORT}:8501
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
postgres:
container_name: postgresql
build:
context: ./postgresql
dockerfile: Dockerfile
restart: on-failure
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=postgres
volumes:
- ./postgresql/data:/var/lib/postgresql/data