dclong/jupyterhub-ds @DockerHub | @GitHub
JupyterHub for Data Science. This is the recommended Docker image to use if you want to do data science related work in JupyterLab/Jupyter Notebook. For deep learning leveraging GPU, please use dclong/jupyterhub-pytorch. Note: Python packages in this version are managed using pip instead of conda.
You need to install Docker before you use this Docker image.
Please refer to the section Usage of the post My Docker Images for detailed instruction on how to use the Docker image.
The following command starts a container
and mounts the current working directory and /home
on the host machine
to /workdir
and /home_host
in the container respectively.
docker run -d --init \
--privileged \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
--hostname jupyterhub-ds \
--log-opt max-size=50m \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds /scripts/sys/init.sh
Use the image with the next
tag (which is the testing/next version of dclong/jupyterhub-ds).
docker run -d --init \
--privileged \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
--hostname jupyterhub-ds \
--log-opt max-size=50m \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds:next /scripts/sys/init.sh
The following command (only works on Linux) does the same as the above one except that it limits the use of CPU and memory.
docker run -d --init \
--privileged \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
--hostname jupyterhub-ds \
--log-opt max-size=50m \
--memory=$(($(head -n 1 /proc/meminfo | awk '{print $2}') * 4 / 5))k \
--cpus=$(($(nproc) - 1)) \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds /scripts/sys/init.sh
Use the image with the next
tag (which is the testing/next version of dclong/jupyterhub-ds).
docker run -d --init \
--privileged \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
--hostname jupyterhub-ds \
--log-opt max-size=50m \
--memory=$(($(head -n 1 /proc/meminfo | awk '{print $2}') * 4 / 5))k \
--cpus=$(($(nproc) - 1)) \
-p 8000:8000 \
-p 5006:5006 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds:next /scripts/sys/init.sh
You can still launch a JupyterLab service using this Docker image.
docker run -d --init \
--privileged \
--cap-add SYS_ADMIN \
--platform linux/amd64 \
--hostname jupyterlab \
--log-opt max-size=50m \
--memory=$(($(head -n 1 /proc/meminfo | awk '{print $2}') * 4 / 5))k \
--cpus=$(($(nproc) - 1)) \
-p 8888:8888 \
-e DOCKER_USER=$(id -un) \
-e DOCKER_USER_ID=$(id -u) \
-e DOCKER_PASSWORD=$(id -un) \
-e DOCKER_GROUP_ID=$(id -g) \
-e DOCKER_ADMIN_USER=$(id -un) \
-v "$(pwd)":/workdir \
-v "$(dirname $HOME)":/home_host \
dclong/jupyterhub-ds /scripts/sys/init.sh /scripts/sys/launch_jlab.sh