File tree Expand file tree Collapse file tree 2 files changed +26
-7
lines changed Expand file tree Collapse file tree 2 files changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ services:
20
20
- " 0.0.0.0:8888:8888" # JupyterLab
21
21
volumes :
22
22
- /home/ubuntu/pyhpc-tutorial:/pyhpc-tutorial
23
+ environment :
24
+ - BREV_ENV_ID
23
25
user : root
24
26
working_dir : /pyhpc-tutorial/notebooks
25
27
restart : unless-stopped
@@ -37,18 +39,14 @@ services:
37
39
- driver : nvidia
38
40
count : all
39
41
capabilities : [gpu]
40
- environment :
41
- - NVIDIA_DRIVER_CAPABILITIES=all
42
- - HOST_IP=0.0.0.0
43
- - WEB_USERNAME=""
44
- - WEB_PASSWORD=""
45
- - SELKIES_TURN_HOST=nsight-turn0-${BREV_ENV_ID}.brevlab.com
46
- - TURN_PORT=80
47
42
ports :
48
43
- " 0.0.0.0:8080:8080" # HTTP
49
44
- " 0.0.0.0:3478:3478" # TURN
50
45
volumes :
51
46
- /home/ubuntu/pyhpc-tutorial:/pyhpc-tutorial
47
+ environment :
48
+ - BREV_ENV_ID
52
49
user : root
53
50
working_dir : /pyhpc-tutorial/notebooks
51
+ entrypoint : ["/pyhpc-tutorial/build/nsight-start.bash"]
54
52
restart : unless-stopped
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ apt-get update
4
+ apt-get install -y curl
5
+
6
+ EXTERNAL_IP=$( curl -sSL ifconfig.me)
7
+
8
+ export NVIDIA_DRIVER_CAPABILITIES=all
9
+ export HOST_IP=0.0.0.0
10
+ export WEB_USERNAME=" "
11
+ export WEB_PASSWORD=" "
12
+ export SELKIES_TURN_HOST=$( curl -sSL ifconfig.me)
13
+
14
+ VARS=(" NVIDIA_DRIVER_CAPABILITIES" " HOST_IP" " WEB_USERNAME" " WEB_PASSWORD" " SELKIES_TURN_HOST" )
15
+ for VAR in " ${VARS[@]} " ; do
16
+ if [[ -n " ${! VAR+x} " ]]; then
17
+ echo " export $VAR =${! VAR} " >> ~ /.bashrc
18
+ fi
19
+ done
20
+
21
+ source /setup/entrypoint.sh " $@ "
You can’t perform that action at this time.
0 commit comments