Skip to content

Davidelanz/jupytorch-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupytorch | Docker image enabled with Pytorch and Jupyter

Docker Image CI

Repository for the davidelanz/jupytorch docker image. It provides a quick set up for Pytorch and Jupyter Lab with Docker.

Features
The image supports nbdev paradigm (by fast.ai), allowing you to develop python libraries directly in Jupyter Notebooks
The image comes with jupyterlab_code_formatter already installed
The image comes with LSP Python language server for JupyterLab already installed

Mount from DockerHub

Download the image from davidelanz/jupytorch, 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/jupytorch:TAG

Your workspace will be available at localhost:CONTANER_PORT.

Supported tags:

  • docker pull davidelanz/jupytorch:cpu
  • docker pull davidelanz/jupytorch:gpu-cuda10.1-cudnn7
  • docker pull davidelanz/jupytorch:gpu-cuda10.1-cudnn8
  • docker pull davidelanz/jupytorch:gpu-cuda10.2-cudnn7
  • docker pull davidelanz/jupytorch:gpu-cuda10.2-cudnn8
  • docker pull davidelanz/jupytorch:gpu-cuda11.1.1-cudnn8

Build Custom CPU version from GitHub

The CPU version is directly built on the ubuntu18.04 docker image.

$ git clone https://github.com/davidelanz/jupytorch-docker
$ cd jupytorch-docker/cpu

# choose different PYTHON_VERSION and PYTORCH_VERSION arguments if needed

$ docker build . -t jupytorch/cpu \
    --build-arg PYTHON_VERSION=### \
    --build-arg PYTORCH_VERSION=###

Build Custom GPU version from GitHub

The GPU version is directly built on the nvidia/cuda:{CUDA_VERSION}-cudnn{CUDNN_VERSION}-runtime-ubuntu18.04 docker image.

$ git clone https://github.com/davidelanz/jupytorch-docker
$ cd jupytorch-docker/gpu

# choose different PYTHON_VERSION, PYTORCH_VERSION, CUDA_VERSION, and CUDNN_VERSION arguments if needed

$ docker build . -t jupytorch/cpu \
    --build-arg PYTHON_VERSION=### \
    --build-arg PYTORCH_VERSION=### \
    --build-arg CUDA_VERSION=### \
    --build-arg CUDNN_VERSION=###