diff --git a/codeserver/ubi9-python-3.9/run-code-server.sh b/codeserver/ubi9-python-3.9/run-code-server.sh index 2562b072a..dcb219c6e 100755 --- a/codeserver/ubi9-python-3.9/run-code-server.sh +++ b/codeserver/ubi9-python-3.9/run-code-server.sh @@ -16,10 +16,29 @@ fi # Initilize access logs for culling echo '[{"id":"code-server","name":"code-server","last_activity":"'$(date -Iseconds)'","execution_state":"running","connections":1}]' > /var/log/nginx/vscode.access.log -# Install extensions if not present +# Check if code-server exists if [ ! -f "/opt/app-root/src/.local/share/code-server" ]; then - code-server --install-extension ms-python.python - code-server --install-extension ms-toolsai.jupyter + + # Check internet connection + if curl -Is http://www.google.com | head -n 1 | grep -q "200 OK"; then + # Internet connection is available + echo "Internet connection available. Installing specific extensions." + + # Install specific extensions + code-server --install-extension ${SCRIPT_DIR}/utils/ms-python.python-2023.14.0.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-2023.3.100.vsix + else + # No internet connection + echo "No internet connection. Installing all extensions." + + # Install all extensions + code-server --install-extension ${SCRIPT_DIR}/utils/ms-python.python-2023.14.0.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-2023.3.100.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.jupyter-renderers-1.0.17.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.8.vsix + code-server --install-extension ${SCRIPT_DIR}/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.5.vsix + fi fi # Start server diff --git a/codeserver/ubi9-python-3.9/utils/ms-python.python-2023.14.0.vsix b/codeserver/ubi9-python-3.9/utils/ms-python.python-2023.14.0.vsix new file mode 100644 index 000000000..85d78b0c6 Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-python.python-2023.14.0.vsix differ diff --git a/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-2023.3.100.vsix b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-2023.3.100.vsix new file mode 100644 index 000000000..0b4b7b3f1 Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-2023.3.100.vsix differ diff --git a/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix new file mode 100644 index 000000000..b60dafecf Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix differ diff --git a/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-renderers-1.0.17.vsix b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-renderers-1.0.17.vsix new file mode 100644 index 000000000..32f92dda2 Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-toolsai.jupyter-renderers-1.0.17.vsix differ diff --git a/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.8.vsix b/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.8.vsix new file mode 100644 index 000000000..06bc25390 Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.8.vsix differ diff --git a/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.5.vsix b/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.5.vsix new file mode 100644 index 000000000..34ba17338 Binary files /dev/null and b/codeserver/ubi9-python-3.9/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.5.vsix differ