- Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved) You can also remove the old dangling images: docker image prune.
- Customized base image for Telekube that enables GPU support. By continuumio. Updated 3 years ago.
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES def85eff5f51 djangoweb 'python3 manage.py.' 10 minutes ago Up 9 minutes 0.0.0.0:8000- 8000/tcp djangoweb1 678ce61c79cc postgres 'docker-entrypoint.' 20 minutes ago Up 9 minutes 5432/tcp djangodb1.
Using one of the Jupyter Docker Stacks requires two choices:
- Which Docker image you wish to use
- How you wish to start Docker containers from that image
This section provides details about the second.
Using the Docker CLI¶
You can launch a local Docker container from the Jupyter Docker Stacks using the Docker command line interface. There are numerous ways to configure containers using the CLI. The following are some common patterns.
Example 1 This command pulls the jupyter/scipy-notebook
image tagged 2c80cf3537ca
from Docker Hub if it is not already present on the local host. It then starts a container running a Jupyter Notebook server and exposes the server on host port 8888. The server logs appear in the terminal and include a URL to the notebook server.
Pressing Ctrl-C
shuts down the notebook server but leaves the container intact on disk for later restart or permanent deletion using commands like the following:
Example 2 This command pulls the jupyter/r-notebook
image tagged e5c5a7d3e52d
from Docker Hub if it is not already present on the local host. It then starts a container running a Jupyter Notebook server and exposes the server on host port 10000. The server logs appear in the terminal and include a URL to the notebook server, but with the internal container port (8888) instead of the the correct host port (10000).
Pressing Ctrl-C
shuts down the notebook server and immediately destroys the Docker container. Files written to ~/work
in the container remain touched. Any other changes made in the container are lost.
Example 3 This command pulls the jupyter/all-spark-notebook
image currently tagged latest
from Docker Hub if an image tagged latest
is not already present on the local host. It then starts a container named notebook
running a JupyterLab server and exposes the server on a randomly selected port.
The assigned port and notebook server token are visible using other Docker commands.
Together, the URL to visit on the host machine to access the server in this case is http://localhost:32769?token=15914ca95f495075c0aa7d0e060f1a78b6d94f70ea373b00.
The container runs in the background until stopped and/or removed by additional Docker commands.
Using Binder¶
Binder is a service that allows you to create and share custom computing environments for projects in version control. You can use any of the Jupyter Docker Stacks images as a basis for a Binder-compatible Dockerfile. See the docker-stacks example and Using a Dockerfile sections in the Binder documentation for instructions.
Using JupyterHub¶
You can configure JupyterHub to launcher Docker containers from the Jupyter Docker Stacks images. If you’ve been following the Zero to JupyterHub with Kubernetes guide, see the Use an existing Docker image section for details. If you have a custom JupyterHub deployment, see the Picking or building a Docker image instructions for the dockerspawner instead.
Python3 Docker Container
Using Other Tools and Services¶
Python 3 Docker Container Tote
You can use the Jupyter Docker Stacks with any Docker-compatible technology (e.g., Docker Compose, docker-py, your favorite cloud container service). See the documentation of the tool, library, or service for details about how to reference, configure, and launch containers from these images.