Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install vscode extensions, attempt #3 #32

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ COPY --chown=jovyan:jovyan . /home/jovyan/.kernels
USER root

ENV QUARTO_CLI=https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.433/quarto-1.3.433-linux-amd64.deb

ENV VSCODE_EXT_DIR=/opt/code-server/extensions
RUN mkdir -p ${VSCODE_EXT_DIR} && chown -R ${NB_USER}: ${VSCODE_EXT_DIR}

RUN wget -O /tmp/quarto.deb ${QUARTO_CLI} && dpkg -i /tmp/quarto.deb && rm -rf /tmp/quarto.deb && apt-get clean

Expand All @@ -19,9 +16,7 @@ WORKDIR ${HOME}/.kernels

RUN chmod +x install-kernels.sh && cd /home/jovyan/.kernels && ./install-kernels.sh environments

RUN echo "extensions-dir: $VSCODE_EXT_DIR" >> $HOME/.config/code-server/config.yaml && \
EXT_LIST="ms-python.python quarto.quarto" && \
for EXT in $EXT_LIST; do code-server --install-extension $EXT; done
RUN chmod +x install-vscode-ext.sh && ./install-vscode-ext.sh vscode-extensions.txt

ENV JUPYTERHUB_HTTP_REFERER=https://openscapes.2i2c.cloud/

15 changes: 15 additions & 0 deletions ci/install-vscode-ext.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Install VSCode extensions.
# These get installed to $CONDA_PREFIX/envs/notebook/share/code-server/extensions/

ext_file="$1"

echo "Checking for '$ext_file'..."

if test -f "$ext_file"
then
for EXT in $(cat "$ext_file")
do code-server --install-extension $EXT
done
fi
3 changes: 3 additions & 0 deletions ci/vscode-extensions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ms-python.python
ms-toolsai.jupyter
quarto.quarto