Skip to content
Snippets Groups Projects
Commit 5d222713 authored by vno86ego3q's avatar vno86ego3q
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
export PATH="/tmp/packages/usr/share/code/bin:$HOME/jupyterhub-vscode:$PATH"
export LD_LIBRARY_PATH="/tmp/packages/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
export http_proxy="http://proxy.univ-lyon1.fr:3128"
export https_proxy="http://proxy.univ-lyon1.fr:3128"
export no_proxy="192.168.0.0/24,.liris.cnrs.fr,.univ-lyon1.fr,10.43.0.0/16,10.42.0.0/16,10.245.0.0/16,.svc,.cluster.local"
export HTTP_PROXY="http://proxy.univ-lyon1.fr:3128"
export HTTPS_PROXY="http://proxy.univ-lyon1.fr:3128"
export NO_PROXY="192.168.0.0/24,.liris.cnrs.fr,.univ-lyon1.fr,10.43.0.0/16,10.42.0.0/16,10.245.0.0/16,.svc,.cluster.local"
\ No newline at end of file
# VSCode for JupyterHub
Install Visual Studio Code in a PAGODA JupyterHub VM and access it remotely using Remote Tunnels.
*:warning: Warning: as we do not have admin access to the VM, we have to tinker with package installation. Ideally it would be a good idea to provide a special image with VSCode already installed.*
## Installation
*Installation should be performed once at the startup of the VM.*
Open a JupyterHub terminal.
Edit the `~/.bashrc` file (e.g., `vim ~/.bashrc`).
At the end of the file, add the content of this repository's `.bashrc`.
It defines environment variables for the path, libraries, and proxy.
Launch the `install-vscode.sh` script using `bash`:
```shell
bash install-vscode.sh
```
## Usage
Open a JupyterHub terminal.
Launch the `launch-vscode.sh` script using `bash`:
```shell
bash launch-vscode.sh
```
The first time you use this script, you should be asked to "grant access to the server" (see below).
Open the link in your browser, and fill the code.
![](assets/launch.png)
Your remote is now ready!
<br/>
With your local computer, launch VSCode and install the extension [Remote Tunnels](https://code.visualstudio.com/docs/remote/tunnels).
In the Remote Explorer tab, click on `Tunnels +`, choose Github, and then choose `jupyter-pagoda`.
![](assets/remote-explorer.png)
\ No newline at end of file
assets/launch.png

16.2 KiB

assets/remote-explorer.PNG

12.3 KiB

#!/bin/bash
set -e
mkdir -p /tmp/packages
mkdir -p /tmp/download
# Dependencies
wget -O /tmp/download/libnss3.deb http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
dpkg -x /tmp/download/libnss3.deb /tmp/packages
wget -O /tmp/download/libnspr4.deb http://security.ubuntu.com/ubuntu/pool/main/n/nspr/libnspr4_4.35-0ubuntu0.22.04.1_amd64.deb
dpkg -x /tmp/download/libnspr4.deb /tmp/packages
wget -O /tmp/download/libgtk-3-0.deb http://security.ubuntu.com/ubuntu/pool/main/g/gtk+3.0/libgtk-3-0_3.24.33-1ubuntu2.1_amd64.deb
dpkg -x /tmp/download/libgtk-3-0.deb /tmp/packages
wget -O /tmp/download/libatk1.0-0.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/a/atk1.0/libatk1.0-0_2.36.0-3build1_amd64.deb
dpkg -x /tmp/download/libatk1.0-0.deb /tmp/packages
wget -O /tmp/download/libatk-bridge2.0-0.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/a/at-spi2-atk/libatk-bridge2.0-0_2.38.0-3_amd64.deb
dpkg -x /tmp/download/libatk-bridge2.0-0.deb /tmp/packages
wget -O /tmp/download/libxcomposite1.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/libx/libxcomposite/libxcomposite1_0.4.5-1build2_amd64.deb
dpkg -x /tmp/download/libxcomposite1.deb /tmp/packages
wget -O /tmp/download/libxdamage1.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/libx/libxdamage/libxdamage1_1.1.5-2build2_amd64.deb
dpkg -x /tmp/download/libxdamage1.deb /tmp/packages
wget -O /tmp/download/libatspi.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/a/at-spi2-core/libatspi2.0-0_2.44.0-3_amd64.deb
dpkg -x /tmp/download/libatspi.deb /tmp/packages
wget -O /tmp/download/libepoxy0.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/libe/libepoxy/libepoxy0_1.5.10-1_amd64.deb
dpkg -x /tmp/download/libepoxy0.deb /tmp/packages
# wget -O /tmp/download/libsecret.deb http://fr.archive.ubuntu.com/ubuntu/pool/main/libs/libsecret/libsecret-1-0_0.20.5-2_amd64.deb
# dpkg -x /tmp/download/libsecret.deb /tmp/packages
# VSCode
wget -O /tmp/download/code.deb "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
dpkg -x /tmp/download/code.deb /tmp/packages
\ No newline at end of file
#!/bin/bash
set -e
mkdir -p /tmp/vscode/server
code tunnel --accept-server-license-terms --server-data-dir=/tmp/vscode/server --name="jupyter-pagoda"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment