Skip to content

Davidelanz/jupyter-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter-Docker | Docker image enabled with Jupyter

Docker Image CI

Repository for the davidelanz/jupyter docker image. It provides a quick, dockerized set up for Jupyter Lab with multiple Conda environments.

Features
The image comes with jupyterlab_code_formatter already installed
The image comes with LSP Python language server for JupyterLab (jedi 0.17.2) already installed
The image comes already with a Python3.7 Conda environment with OpenCV support called opencv-py3.7



Loading the image

Mount from DockerHub

Download the image from davidelanz/jupyter, then mount the container (the image exposes JupyterLab on the 8888 port):

docker run -p CONTANER_PORT:8888 -v EXTERNAL_FOLDER:/workspace --name CONTAINER_NAME davidelanz/jupyter

Your workspace will be available at localhost:CONTANER_PORT.

Build from GitHub

The image can be directly built from the GitHub repository:

$ git clone https://github.com/davidelanz/jupyter-docker
$ cd jupyter-docker/
$ docker build . -t davidelanz/jupyter

Using the image

Creating and loading new Conda environment

The image comes already with a Python3.7 environment with OpenCV support called opencv-py3.7.

You can create a new enviroment as follows (you can easily do it from the JupyterLab console):

conda create -y --name <DESIRED_ENV_NAME> python=<DESIRED_PYTHON_VERSION>

Then you can load it to JupyterLab as follows:

conda activate <DESIRED_ENV_NAME> && conda install -y ipykernel && python -m ipykernel install --name <DESIRED_ENV_NAME> --user

With Jupyter installed you get the list of currently installed kernels with:

jupyter kernelspec list

If you want to uninstall an unwanted kernel:

jupyter kernelspec uninstall <UNWANTED_KERNEL>