Skip to content

Commit 52f8c7d

Browse files
committed
ngc-matlab: Add bootstrap script to handle VNC preparation
1 parent 2dc0a19 commit 52f8c7d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

vendor/ngc-matlab/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ LABEL ai.backend.kernelspec="1" \
1919
ai.backend.resource.min.cuda.shares=0.1 \
2020
ai.backend.base-distro="ubuntu16.04" \
2121
ai.backend.runtime-type="matlab" \
22-
ai.backend.runtime-path="/usr/local/bin/matlab" \
23-
ai.backend.service-ports="vnc:tcp:5901,matlab:http:6080"
22+
ai.backend.runtime-path="/usr/bin/python" \
23+
ai.backend.service-ports="vnc:http:6080"
24+
25+
COPY bootstrap.sh /opt/container/bootstrap.sh
2426

2527
WORKDIR /home/work
2628
# vim: ft=dockerfile

vendor/ngc-matlab/bootstrap.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#! /bin/sh
2+
# reference: /bin/run.sh
3+
4+
SUEXEC="/opt/kernel/su-exec $USER_ID:$GROUP_ID"
5+
6+
rm /opt/noVNC/index.html
7+
ln -s /opt/noVNC/redirect.html /opt/noVNC/index.html
8+
9+
rm -rf /tmp/.X*
10+
11+
"$SUEXEC" /usr/bin/vncserver -geometry 1600x1200 > /dev/null 2>&1
12+
13+
# The next line is executed by the kernel runner's service port handler.
14+
# "$SUEXEC" /opt/noVNC/utils/launch.sh --listen 6080 --vnc localhost:5901 > /dev/null 2>&1 &

0 commit comments

Comments
 (0)