-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
42 lines (40 loc) · 1.18 KB
/
docker-compose.yaml
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
# @Author: Condados
# @Date: 2022-11-12 12:13:44
# @Last Modified by: Condados
# @Last Modified time: 2022-11-12 18:38:12
version: "3.9" # optional since v1.27.0
# docker-compose reference: https://docs.docker.com/compose/compose-file/compose-file-v3
services:
main:
container_name: "${USER_NAME}-${PROJECT_NAME}"
image: ${PROJECT_NAME}:${USER_NAME}
restart: unless-stopped
build: .
user: "${UID}:${GID}"
shm_size: 16gb
environment:
- KAGGLE_USERNAME=${KAGGLE_USERNAME}
- KAGGLE_KEY=${KAGGLE_KEY}
- WANDB_API_KEY=${WANDB_API_KEY}
- WANDB_CACHE_DIR=/workspace/cache
volumes:
- /etc/passwd:/etc/passwd #just to get the user name by using getpwuid()
- type: bind
source: ./workspace
target: /workspace
- type: bind
source: ${DATASETS}
target: /datasets
volume:
nocopy: true
deploy:
# For more information: https://docs.docker.com/compose/gpu-support/
resources:
limits:
cpus: ${CPU}
memory: ${MEMORY}
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
command: tail -F anything