Skip to content

Commit

Permalink
Add .vsix packages for ms-python and ma-toolsai to be compatible with…
Browse files Browse the repository at this point in the history
… disconnected enviroments
  • Loading branch information
atheo89 committed Nov 17, 2023
1 parent d071735 commit ad50501
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions codeserver/ubi9-python-3.9/run-code-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,25 @@ 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
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

# Start server
Expand Down
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 comments on commit ad50501

Please sign in to comment.