Skip to content

Commit 0ffca51

Browse files
committed
Add .vsix packages for ms-python and ma-toolsai to be compatible with disconnected enviroments
1 parent d071735 commit 0ffca51

7 files changed

+22
-3
lines changed

codeserver/ubi9-python-3.9/run-code-server.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,29 @@ fi
1616
# Initilize access logs for culling
1717
echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/vscode.access.log
1818

19-
# Install extensions if not present
19+
# Check if code-server exists
2020
if [ ! -f "/opt/app-root/src/.local/share/code-server" ]; then
21-
code-server --install-extension ms-python.python
22-
code-server --install-extension ms-toolsai.jupyter
21+
22+
# Check internet connection
23+
if curl -Is http://www.google.com | head -n 1 | grep -q "200 OK"; then
24+
# Internet connection is available
25+
echo "Internet connection available. Installing specific extensions."
26+
27+
# Install specific extensions
28+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-python.python-2023.14.0.vsix
29+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-2023.3.100.vsix
30+
else
31+
# No internet connection
32+
echo "No internet connection. Installing all extensions."
33+
34+
# Install all extensions
35+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-python.python-2023.14.0.vsix
36+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-2023.3.100.vsix
37+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix
38+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-renderers-1.0.17.vsix
39+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.8.vsix
40+
code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.5.vsix
41+
fi
2342
fi
2443

2544
# Start server
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)