Build and deploy a container capable of running jupyter notebooks using Jupyter Lab.
274
Build and deploy a container running jupyter notebooks using Jupyter Lab. The Dockerfile creates an image that is flexible enough so you can install additional python packages at run-time as needed using special environment variables.
You can build your own image or pull it from the docker hub alisio/jupyter-lab
There are images available for the following architectures:
The following python packages are installer during the build:
jupyterlab 3.3.4beautifulsoup4 4.11.1matplotlib 3.5.1numpy 1.22.3pandas 1.4.2scikit mage 0.19.2scikit earn 1.0.2scipy 1.8.0swat 1.6.1Build the image running the command inside the repo folder:
docker build -t alisio/jupyter-lab .
Basic usage with default python packages:
docker run \
--name alisio-jupyter-lab \
-p 8888:8888 \
-v <path to notebooks>:/opt/jupyterlab/notebooks \
-v <path to config>:/opt/jupyterlab/config \
alisio/jupyter-lab
It is possible to install additional python packages setting the PIP_PACKAGES environment variable. The format is simple and consists of a string of package names separated by a space (e.g: "numpy pandas requests"):
docker run \
--name alisio-jupyter-lab \
-p 8888:8888 \
-v <path to notebooks>:/opt/jupyterlab/notebooks \
-v <path to config>:/opt/jupyterlab/config \
-e PIP_PACKAGES="package1 package2 ..." \
alisio/jupyter-lab
Mind you that installing additional packages can break the container.
Get the authorization token running the following command on your terminal:
docker exec alisio-jupyter-lab jupyter server list
It should return the authorization token among other information:
Currently running servers:
http://effae095fdb9:8888/?token=9e5ad61ebce3d2b9050b5a1eege0a6eca4cf118c05ee7def :: /opt/jupyterlab/notebooks
Antonio Alisio de Meneses Cordeiro - [email protected]
Content type
Image
Digest
Size
907.8 MB
Last updated
over 4 years ago
docker pull alisio/jupyter-lab