For all of you struggling with this as well. I solved it by building my own container and adding some flags when running the container.
An example, adding Keras to the nvidia tensorflow container.
- Create a file called "Dockerfile"
- Enter the following
RUN pip install jupyter
RUN pip install keras
- Run the following in a terminal inside of the folder where you saved the "Dockerfile"
docker build -t my-nvidia-container .
- The container is now built. To run it run the following
docker run --runtime=nvidia -it my-nvidia-container
If you’re looking to add a folder with files to the docker container
Run the following command when starting the docker container instead
docker run --runtime=nvidia -it -v "/my-local-computer-files/:/my-docker-container/" my-nvidia-container
. Where if you change directory to
inside of the container, your files in
should be visible and accessible.
Access jupyter notebook
Add the flag
to the command. You may combine this with the one above (
docker run --runtime=nvidia -it -p "8888:8888" -v "/my-local-computer-files/:/my-docker-container/" my-nvidia-container
And when you’re inside of the docker container run
jupyter notebook --port=8888 --ip=0.0.0.0 --allow-root --no-browser .
and then you’ll be able to access it from your local browser at http://localhost:8888
Hope that helps.