CUDA accelerated Pytorch and Jupyter Lab.
1.1K
This repository contains Pytorch + Monai DL stack that I prepared for Monai Bootcamp 2021. The container is based on official Jupyter Docker Stacks's scipy-notebook, but changes the root image in base-notebook to Nvidia's CUDA 11 base image with Ubuntu 20.04 LTS. Conda 4.10.3, Python 3.8.12, Pytorch 1.9.1 with CUDA 10.2 capabilities and, of course, MONAI 0.6.0.
NOTE since jupyter-lab runs under non-root jovyan user, you need to replace NB_UID=1000 and NB_GID=1000 with your uid and gid in order not to mess up the volume mapping. Also you might need to check that the volume mapping's paths reflect your host.
Sample script for running the container (assumes Nvidia GPU on host):
!/bin/bash
TOKEN=rihanna
DOCKER_IMAGE="ahtonen/pytorch-notebook:latest"
CONTAINER_NAME="monai_stack"
RUN_ARGS="-d"
echo "Running $DOCKER_IMAGE"
#
# Port mappings:
# 8888, Jupyter Lab
# 6006, Tensorboard
#
docker run $RUN_ARGS \
--user root \
--gpus all \
--ipc host \
--name $CONTAINER_NAME \
-e NB_UID=1000 \
-e NB_GID=1000 \
-e GRANT_SUDO=yes \
-e JUPYTER_ENABLE_LAB=yes \
-p 8888:8888 \
-p 6006:6006 \
-v "${HOME}/src:/home/jovyan/src" $DOCKER_IMAGE \
start-notebook.sh \
--NotebookApp.token=$TOKEN
Content type
Image
Digest
sha256:b900ba496…
Size
4.2 GB
Last updated
over 2 years ago
docker pull ahtonen/pytorch-notebook