Skip to content

Commit

Permalink
build: move vscode install to a script
Browse files Browse the repository at this point in the history
  • Loading branch information
rokroskar committed Nov 25, 2020
1 parent 045588f commit 34fe3df
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
7 changes: 0 additions & 7 deletions docker/py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
python-dev \
unzip \
vim && \
wget https://github.com/cdr/code-server/releases/download/v3.6.2/code-server_3.6.2_amd64.deb && \
dpkg -i ./code-server*.deb && \
rm code-server_3.6.2_amd64.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1

Expand All @@ -49,12 +45,9 @@ RUN python3 -m pip install --no-cache -U pip && \
python3 -m pip install --no-cache -r /tmp/requirements.txt && \
jupyter labextension install --no-build @jupyterlab/toc && \
jupyter labextension install --no-build jupyterlab-topbar-extension jupyterlab-system-monitor && \
jupyter serverextension enable --py jupyter_server_proxy && \
jupyter labextension install --no-build @jupyterlab/server-proxy && \
jupyter lab build && \
jupyter labextension list && \
npm cache clean --force && \
code-server --install-extension ms-python.python && \
rm -rf /home/${NB_USER}/.cache

# fix https://github.com/SwissDataScienceCenter/renku-jupyter/issues/14
Expand Down
3 changes: 2 additions & 1 deletion docker/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
git+https://github.com/betatim/vscode-binder
jupyterhub==1.1.0
jupyterlab-git==0.20.0
jupyterlab_server~=1.0.0
jupyter-server-proxy==1.5.0
nbresuse==0.3.6
nbclient<0.5.1
papermill==2.1.3
pipx>=0.15.0.0
powerline-shell==0.7.0
Expand Down
15 changes: 15 additions & 0 deletions scripts/install-vscode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

VSCODE_VERSION=${"$VSCODE_VERSION":-"3.6.2"}

# code-server installation
wget https://github.com/cdr/code-server/releases/download/v${VSCODE_VERSION}/code-server_3.6.2_amd64.deb
dpkg -i ./code-server*.deb
rm code-server_3.6.2_amd64.deb
apt-get clean
code-server --install-extension ms-python.python

# Jupyter support
pip install git+https://github.com/betatim/vscode-binder
jupyter serverextension enable --py jupyter_server_proxy && \
jupyter labextension install --no-build @jupyterlab/server-proxy

0 comments on commit 34fe3df

Please sign in to comment.