note •
JupyterLab Cheatsheet
Running JupyterLab in Docker and connecting from VSCode
JupyterLab Cheatsheet
Docker Container
https://github.com/jupyter/docker-stacks
Start Docker container:
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work quay.io/jupyter/minimal-notebook:2024-01-15
Start Docker container with jovyan as sudoer:
docker run -it --rm -p 8888:8888 --user root -e GRANT_SUDO=yes -v "${PWD}":/home/jovyan/work quay.io/jupyter/minimal-notebook:2024-01-15
The output will provide a URL like http://127.0.0.1:8888/lab?token=07da2203f5c9d50fb971a3247c27cb2ab7b37e22904afc73 make sure to change 8888 to whatever port was specified when the container was created.
Connecting VSCode to JupyterLab Docker
- Open ipynb file
- Choose kernel
- Choose existing server
- Provide server URL (example
http://127.0.0.1:10000/lab?token=07da2203f5c9d50fb971a3247c27cb2ab7b37e22904afc73) - Give it a name
- Choose kernel