Skip to content

Commit

Permalink
feat: add vscode install script (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokroskar authored Nov 26, 2020
1 parent f3a7a37 commit 5534f22
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,23 @@ pull:
docker pull $(DOCKER_PREFIX)$$ext:$(DOCKER_LABEL) ; \
done

r: py3.7
r: py
docker build docker/r \
--build-arg RENKU_PIP_SPEC=$(RENKU_PIP_SPEC) \
--build-arg RENKU_BASE=renku/renkulab-py3.7:$(GIT_MASTER_HEAD_SHA)$(RENKU_TAG) \
--build-arg RVERSION=$(RVERSION) \
-t $(DOCKER_PREFIX)-r:$(DOCKER_LABEL)$(RENKU_TAG)$(R_TAG) && \
docker tag $(DOCKER_PREFIX)-r:$(DOCKER_LABEL)$(RENKU_TAG)$(R_TAG) $(DOCKER_PREFIX)-r:$(GIT_MASTER_HEAD_SHA)$(RENKU_TAG)$(R_TAG)

bioc: py3.7
bioc: py
docker build docker/bioc \
--build-arg RENKU_PIP_SPEC=$(RENKU_PIP_SPEC) \
--build-arg RENKU_BASE=renku/renkulab-py3.7:$(GIT_MASTER_HEAD_SHA)$(RENKU_TAG) \
--build-arg RELEASE=$(BIOC_VERSION) \
-t $(DOCKER_PREFIX)-bioc:$(DOCKER_LABEL)$(RENKU_TAG)$(BIOC_TAG) && \
docker tag $(DOCKER_PREFIX)-bioc:$(DOCKER_LABEL)$(RENKU_TAG)$(BIOC_TAG) $(DOCKER_PREFIX)-bioc:$(GIT_MASTER_HEAD_SHA)$(RENKU_TAG)$(BIOC_TAG)


py3.7:
py:
cd docker/$@ && \
docker build \
--build-arg RENKU_PIP_SPEC=${RENKU_PIP_SPEC} \
-t $(DOCKER_PREFIX)-$@:$(DOCKER_LABEL)$(RENKU_TAG) . && \
docker tag $(DOCKER_PREFIX)-$@:$(DOCKER_LABEL)$(RENKU_TAG) $(DOCKER_PREFIX)-$@:$(GIT_MASTER_HEAD_SHA)$(RENKU_TAG)
9 changes: 6 additions & 3 deletions docker/py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
papermill==2.1.3
requests>=2.20.0
jupyterhub==1.1.0
nbresuse==0.3.6
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
requests>=2.20.0
16 changes: 16 additions & 0 deletions scripts/install-vscode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/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
chown -R 1000:1000 /home/${NB_USER}/.local/share

# 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 5534f22

Please sign in to comment.