This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
74 lines (70 loc) · 1.79 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
71
72
73
74
# docker-compose script to build multi-node training environment.
#
# Author : NoUnique ([email protected])
# Copyright 2020 NoUnique. All Rights Reserved
version: '2.2'
services:
dev:
build:
context: .
dockerfile: ./Dockerfile_dev
args:
USER: ${USER}
hostname: devenv
image: "${COMPOSE_IMAGE_NAME}:${USER}"
environment:
- PYTHONPATH=/home/${USER}/dev
- PYTHONUNBUFFERED=0
- DISPLAY=${DISPLAY}
working_dir: /home/${USER}/dev
user: ${USER}
network_mode: host
volumes:
- ..:/home/${USER}/dev:rw
- /data:/data
# X11 fowarding
- ~/.Xauthority:/home/${USER}/.Xauthority
- /tmp/.X11-unix:/tmp/.X11-unix:rw
entrypoint:
- /bin/bash
stdin_open: true # -i(interactive) option in docker
tty: true # -t(tty) option in docker
shm_size: 64G
tensorboard:
build:
context: .
dockerfile: ./Dockerfile_dev
args:
USER: ${USER}
hostname: tensorboard
image: "${COMPOSE_IMAGE_NAME}:${USER}"
working_dir: /home/${USER}/dev
user: ${USER}
ports:
- "6006:6006"
volumes:
- ..:/home/${USER}/dev:rw
command: tensorboard --logdir /home/${USER}/dev/checkpoints --host 0.0.0.0
stdin_open: true
tty: true
shm_size: 4G
jupyter:
build:
context: .
dockerfile: ./Dockerfile_jupyter
args:
USER: ${USER}
COMPOSE_IMAGE_NAME: ${COMPOSE_IMAGE_NAME}
hostname: jupyter_notebook
image: "${COMPOSE_IMAGE_NAME}/jupyter:${USER}"
working_dir: /home/${USER}/dev
user: ${USER}
ports:
- "8888:8888"
volumes:
- ..:/home/${USER}/dev:rw
- /data:/data
command: jupyter notebook --no-browser --ip=0.0.0.0 --port=8888 --allow-root
stdin_open: true
tty: true
shm_size: 16G