-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.subdomain.yml
executable file
·99 lines (95 loc) · 3.17 KB
/
docker-compose.subdomain.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3.8"
services:
proxy:
image: traefik:v2.5
ports:
- 80:80
- 8080:8080
depends_on:
- jupyterlab
- code
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
# networks:
# - traefik-subdomain
command:
# - "--log.level=DEBUG"
# Traefik will listen on port 8080 by default for API request.
- "--api.insecure=true"
- "--providers.docker=true"
# - "--providers.docker.constraints=Label(`traefik.constraint-label-stack`)"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:80"
labels:
- traefik.enable=true
# Defines a default docker network to use for connections to all containers.
# - traefik.docker.network=${COMPOSE_PROJECT_NAME}_traefik-subdomain
# - traefik.constraint-label=traefik-subdomain
- traefik.http.routers.proxy.rule=Host(`proxy.${DOMAIN}`)
- traefik.http.routers.proxy.entrypoints=http
- traefik.http.services.proxy.loadbalancer.server.port=80
# - traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=53687091200
jupyterlab:
image: hiennguyen9874/datascience-notebook:ubuntu20.04-py3.8-cpu-v0.1
# image: hiennguyen9874/datascience-notebook:ubuntu20.04-py3.8-cuda11.3-v0.1
command:
["start-notebook.sh", "--NotebookApp.password=${JUPYTERLAB_PASSWORD}"]
expose:
- 8888 # jupyterlab
working_dir: "/"
user: root
ipc: host
volumes:
- workspace-data:/home/jovyan/work
# networks:
# - traefik-subdomain
# runtime: nvidia
environment:
NB_USER: "hiennx"
NB_UID: 1001
CHOWN_HOME: "yes"
JUPYTER_ENABLE_LAB: "yes"
RESTARTABLE: "yes"
GRANT_SUDO: "yes"
# NVIDIA_VISIBLE_DEVICES: all
# NVIDIA_DRIVER_CAPABILITIES: all
restart: unless-stopped
labels:
- traefik.enable=true
# - traefik.docker.network=${COMPOSE_PROJECT_NAME}_traefik-subdomain
# - traefik.constraint-label=traefik-subdomain
- traefik.http.routers.jupyterlab.rule=Host(`jupyterlab.${DOMAIN}`)
- traefik.http.routers.jupyterlab.entrypoints=http
- traefik.http.services.jupyterlab.loadbalancer.server.port=8888
code:
image: hiennguyen9874/code-server:ubuntu20.04-cpu-3.12.0
# image: hiennguyen9874/code-server:ubuntu20.04-cuda11.3-3.12.0
expose:
- 8080
volumes:
- workspace-data:/home/coder/project
- code-config:/root/.config
- code-extension:/root/.local/share/code-server
# runtime: nvidia
ipc: host
user: root
# networks:
# - traefik-subdomain
environment:
CHOWN_HOME: utf-8
PASSWORD: ${CODE_SERVER_PASSWORD}
# NVIDIA_VISIBLE_DEVICES: all
# NVIDIA_DRIVER_CAPABILITIES: all
restart: unless-stopped
labels:
- traefik.enable=true
# - traefik.docker.network=${COMPOSE_PROJECT_NAME}_traefik-subdomain
# - traefik.constraint-label=traefik-subdomain
- traefik.http.routers.code.rule=Host(`code.${DOMAIN}`)
- traefik.http.routers.code.entrypoints=http
- traefik.http.services.code.loadbalancer.server.port=8080
# networks:
# traefik-subdomain:
volumes:
code-config:
code-extension: