Docker for fast.ai

@tthrift Hmm, I’m pretty sure, that the XServer should not be a big slow down. When I view the GPU usage with watch nvidia-smi I’m seeing around 50 %.

Nvidia recently released Ubuntu 18.04 with CUDA 9.2 images on dockerhub, anyone tried upgrading their images to it? Is it worth it, any fast.ai code that breaks with upgrade?

@xev In this image I’m using the images from their NGC registry. They have a monthly release cycle and in the May release uses 16.04. Maybe they switch to 18.04 in the June release.

Well I meant these images - https://hub.docker.com/r/nvidia/cuda/ - they already released 9.2-cudnn7-*-ubuntu18.04. Worth the trouble upgrading over ubuntu 16.04 image?

@xev Ahh, sorry I thought I’m in my own Dockerfile thread. Personally I don’t think it’s giving you any advantage running the same CUDA/CuDNN stack on 16.04 or 18.04.

@Matthew, I’m a huge fan of your Docker container and have used it on several installs. It has made getting up and running with Fast.ai much easier than any other procedure for environment setup I’ve come across!

I just completed a fresh install, and for the first time, had to make a slight deviation from your setup instructions. The last item under “Assumptions” is to install nvidia-docker.

Today, when I ran the curl command, I noticed a strange HTML-dump output. The subsequent steps of the Ubuntu installation instructions did not work. For just the nvidia-docker install, I swapped out the instructions on the official repo with those on this page, and it seems to have done the trick.

The creator of the tutorial goes through installing docker, before nvidia-docker. For those following your setup instructions, they would have already installed docker. They can scroll half-way down the page an pick up after

sudo docker run hello-world

I’m struggling with the login. I ssh into the server and have been able to setup everything, Jupyter is starting up but I can’t figure out where I would find the token or password. Normally it’s displayed on the command line and thought it would be the output that shows up below.

What am I missing? Is there a default password or is the token displayed elsewhere.
Screenshot below.

Did you try jupyter notebook list

Thanks, the problem was my inexperience with docker. I didn’t understand to get a shell to use docker exec -it <containername> /bin/bash and tried using ‘docker login’

Once I did, I was able to run jupyter notebook list get the token and log in.

Thanks for this Dockerflle. I used it with the NGC Pytorch container. I did have to modify the line where it sets the IP address of the notebook:

echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py && \

I tried rebuilding everything from scratch and ran into the following error. I cannot figure out why it won’t install and everything else seems to work fine in jupyter until if I comment out that line. Also tried moving it around.

The command '/bin/sh -c /opt/conda/bin/conda install --name fastai -c fastai torchvision-nightly' returned a non-zero code: 1

Any ideas on how to fix?

Screenshot below:

I’ve had some issues with the paperspace version so built my own. Maybe it’s of use to someone. It now supports both GPU and CPU only hosts: https://github.com/morishuz/fastai-docker

1 Like