Skip to content

🪐 Hassle-free JupyterLab Docker container with root user

License

Notifications You must be signed in to change notification settings

vemonet/Jupyterlab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT Publish Docker image

Jupyterlab Docker container

This Docker container runs as root user! It can be helpful when e.g. the popular jupyter/datascience-notebook image does not work because it runs as Jovyan user.

Installed kernels

Installed Jupyterlab extensions

Your notebooks

Volumes can be mounted into /notebooks folder.

The container will install requirements from files present in the /notebooks folder when it starts up (in this order):

  • packages.txt: install apt-get packages
  • requirements.txt: install pip packages
  • extensions.txt: install JupyterLab extensions

Pull/Update to latest version

docker pull ghcr.io/vemonet/jupyterlab:latest

Run

docker run --rm -it -p 8888:8888 ghcr.io/vemonet/jupyterlab

or if you want to define your own password and shared volume:

docker run --rm -it -p 8888:8888 -v $(pwd)/data:/notebooks -e PASSWORD="password" ghcr.io/vemonet/jupyterlab

Run from Git repository

You can provide a Git repository to be cloned in /notebooks when starting the container (it will automatically install packages if requirements.txt, packages.txt or extensions.txt are present at the root of the repository).

docker run --rm -it -p 8888:8888 -v /data/jupyterlab-notebooks:/notebooks -e PASSWORD="<your_secret>" -e GIT_URL="https://github.com/vemonet/translator-sparql-notebook" ghcr.io/vemonet/jupyterlab:latest

Access on http://localhost:8888 and files shared in /data/jupyterlab-notebooks

or use the current directory as source code in the container:

docker run --rm -it -p 8888:8888 -v $(pwd):/notebooks -e PASSWORD="<your_secret>" ghcr.io/vemonet/jupyterlab:latest

Use ${pwd} for Windows

Run with docker-compose

Add JupyterLab to a docker-compose.yml file:

services:
  jupyterlab:
    container_name: jupyterlab
    image: ghcr.io/vemonet/jupyterlab
    ports:
      - 8888:8888
    volumes:
      - ./data:/notebooks
    environment:
      - PASSWORD=password
      - GIT_URL=https://github.com/vemonet/translator-sparql-notebook

Build from source

Clone the repository, then build the container image:

docker build -t ghcr.io/vemonet/jupyterlab .

About

🪐 Hassle-free JupyterLab Docker container with root user

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 90.5%
  • Dockerfile 5.7%
  • Shell 3.8%