-
Notifications
You must be signed in to change notification settings - Fork 65
/
compose.yml
89 lines (83 loc) · 3.36 KB
/
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
gears: # docker-compose run gears
command: /usr/bin/bash # launch a command line to run compiled gears
image: physino/gears # shorter than physino/geant4:gears
profiles: [ "gears" ] # https://docs.docker.com/compose/profiles
platform: linux/amd64 # pre-compiled geant4 is not available for arm64
environment: # https://docs.docker.com/desktop/networking
- LIBGL_ALWAYS_INDIRECT=1 # https://unix.stackexchange.com/a/642418/26929
- DISPLAY=host.docker.internal:0.0
# host.docker.internal doesn't exist in a Linux host
# https://stackoverflow.com/a/24326540
# https://stackoverflow.com/questions/70725881
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- .:/root/gears # load current folder as /root/gears in container
- ./INSTALL/Geant4/data:/usr/share/Geant4/data
build: INSTALL/Docker # docker-compose build gears
geant4: # docker-compose run geant4
command: vncserver
image: physino/geant4
profiles: [ "geant4" ]
ports: [ "8444:8444" ]
volumes: [ ".:/root/gears" ]
working_dir: /root/gears
build: INSTALL/Geant4
root: # docker-compose run root
command: /usr/bin/bash # launch a command line to run root
image: physino/root # https://hub.docker.com/r/physino/root
profiles: [ "root" ]
environment:
- DISPLAY=host.docker.internal:0.0
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- .:/root/gears
working_dir: /root/gears
build: INSTALL/ROOT/ # docker-compose build root
# launch a Jupyter notebook service to analyze data with ROOT or Python
notebook: # docker-compose up
command: /usr/bin/root --notebook --allow-root --no-browser --ip=0.0.0.0
image: physino/root:notebook
ports: [ "8888:8888" ] # only exposed with `up`, not 'run`
volumes: [".:/root/gears"]
build: INSTALL/ROOT/notebook # docker-compose build notebook
heprapp: # docker-compose run heprapp
command: /usr/bin/hv # launch HepRApp
image: physino/heprapp # https://hub.docker.com/r/physino/heprapp
profiles: [ "heprapp" ]
environment:
- DISPLAY=host.docker.internal:0.0
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- .:/root/gears
# https://github.com/microsoft/WSL/issues/5339#issuecomment-1125709672
# https://docs.docker.com/compose/compose-file/#sysctls
sysctls:
- net.ipv4.tcp_keepalive_intvl=60
- net.ipv4.tcp_keepalive_probes=5
- net.ipv4.tcp_keepalive_time=300
build: tutorials/detector/visualization/ # docker-compose build heprapp
x3d: # docker-compose up x3d
# according to https://stackoverflow.com/a/16488110
# a browser cannot access g4_??.x3d embed in file://g4_??.html
# a simple web server is needed to avoid change browser settings
# -u: don't buffer output (https://stackoverflow.com/a/63195558)
# --cgi: enable CGI (https://stackoverflow.com/a/63195558)
command: python3 -u -m http.server --cgi
image: physino/heprapp
profiles: [ "x3d" ]
ports: [ "8000:8000" ] # only exposed with `up`, not 'run`
volumes: [".:/root/gears"]
web: # docker-compose up web
image: starefossen/github-pages
ports:
- "4000:4000"
volumes:
- ".:/usr/src/app:delegated"
tty: true