Skip to content

My custom Image for Quick setup of Deep Learning Libraries in Python on any machine.

Notifications You must be signed in to change notification settings

DhavalThkkar/DeepLearningDocker

Repository files navigation

Machine Learning and Deep Learning Docker Image

If you're getting started with Machine Learning/Deep Learning, you know how hard it is to setup the environment just to get started. I have built this docker image to help you out. This image contains most of the tools required to do Machine Learning/Deep Learning.

This image can be used on Ubuntu. Steps for installing docker and getting started with the container are given below. Also, this image can be used on AWS, GCP or any cloud platform.

Included Libraries

To be Included

  • Caffe
  • OpenCV
  • CNTK

CPU

  1. Installing Docker
    • Installing Docker on Ubuntu 14.04:
      sudo bash InstallDocker/docker_install1404.sh
    • Installing Docker on Ubuntu 16.04 or above:
      sudo bash InstallDocker/docker_install1604.sh
  2. Building Docker Image:
    sudo docker build -t deeplearningdockercpu -f Dockerfile.cpu .
  3. Running the Docker Container
    sudo docker run -it -p 8888:8888 -p 6006:6006 -v /sharedfolder:/root/sharedfolder deeplearningdockercpu:latest bash

GPU

  1. Installing Docker
    • Installing Docker on Ubuntu 14.04:
      sudo bash InstallDocker/docker_install1404.sh
    • Installing Docker on Ubuntu 16.04 or above:
      sudo bash InstallDocker/docker_install1604.sh
  2. Installing NVIDIA-Docker
    sudo bash nvidia-docker.sh
  3. Building Docker Image
    sudo docker build -t deeplearningdockergpu -f Dockerfile.gpu .
  4. Restarting Nvidia-docker
    sudo systemctl restart nvidia-docker
  5. Running the Docker Container
    sudo nvidia-docker run -it -p 8888:8888 -p 6006:6006 -v /sharedfolder:/root/sharedfolder deeplearningdockergpu:latest bash

Running Jupyter notebook

jupyter notebook --allow-root

Note: You can remove -v /sharedfolder:/root/sharedfolder from CPU as well as GPU if you're running the container on cloud. This command is to just link your local files on the container.

Some Handy commands

  1. Removing all containers
    sudo docker rm $(sudo docker ps -a -f status=exited -q)
  2. Removing all images
    sudo docker rmi $(sudo docker images -a -q)
Issues

If there is any issue, please feel free to open an issue on GitHub or contact me on dhaval.thakkar@somaiya.edu