Skip to content

Commit 66f9c36

Browse files
Correct noVNC installation
1 parent a0eec0a commit 66f9c36

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

sagemaker_ssh_helper/sm-helper-functions

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,3 @@ function _install_sudo() {
153153
apt-get install -y --no-install-recommends sudo
154154
fi
155155
}
156-
157-
function _install_noVNC_linux() {
158-
json_value_regexp='s/^[^"]*".*": \"\(.*\)\"[^"]*/\1/'
159-
latest_noVNC_release=$(curl -s https://api.github.com/repos/novnc/noVNC/releases/latest)
160-
161-
novnc_tag=$(echo "$latest_noVNC_release" | grep "tag_name" | sed -e "$json_value_regexp")
162-
echo "Got latest noVNC release tag: $novnc_tag"
163-
164-
curl -sSL "https://api.github.com/repos/novnc/noVNC/tarball/$novnc_tag" -o "/tmp/noVNC.tgz"
165-
mkdir -p /tmp/noVNC
166-
tar xzf /tmp/noVNC.tgz -C /tmp/noVNC --strip-components=1
167-
}

server-lc-config.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ env
2929

3030
sm-local-configure
3131

32+
function _install_noVNC_linux() {
33+
json_value_regexp='s/^[^"]*".*": \"\(.*\)\"[^"]*/\1/'
34+
latest_noVNC_release=$(curl -s https://api.github.com/repos/novnc/noVNC/releases/latest)
35+
36+
novnc_tag=$(echo "$latest_noVNC_release" | grep "tag_name" | sed -e "$json_value_regexp")
37+
echo "Got latest noVNC release tag: $novnc_tag"
38+
39+
curl -sSL "https://api.github.com/repos/novnc/noVNC/tarball/$novnc_tag" -o "/tmp/noVNC.tgz"
40+
mkdir -p /tmp/noVNC
41+
tar xzf /tmp/noVNC.tgz -C /tmp/noVNC --strip-components=1
42+
}
3243
_install_noVNC_linux
3344

3445
cd /tmp/noVNC

0 commit comments

Comments
 (0)