Git Product home page Git Product logo

ywp-docker's Introduction

Inspired by floydhub/dl-docker, this docker includes my personal setting for Deep Learning development.

This dockerfile includes:

  • Ubuntu 16.04 + Nvidia Cuda 8.0 + CuDNN 6
  • Tensorflow 1.3.0 gpu
  • Theano 0.9.0
  • Keras 1.2.0
  • Torch
  • Caffe
  • Caffe-SSD
  • Lasange 0.1
  • OpenCV 3
  • Jupyter

(personal preference)

  • tmux
  • vim
  • zsh
  • Welcome to grab this, but note that I am new to Docker and this dockerfile is also for practice.

Install docker

https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

# post-installation
sudo groupadd docker
sudo usermod -aG docker $USER
(log out and in)
docker run hello-world

Install nvidia-docker

https://github.com/NVIDIA/nvidia-docker

Move docker directory (in case of the lack of the root space)

https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux

systemctl stop docker                       # (or) docker service stop
ps aux | grep -i docker | grep -v grep      # make sure nothing 
mkdir /new/path/docker
sudo rsync -axP --info=progress2 /var/lib/docker/ /new/path/docker
sudo subl lib/systemd/system/docker.service
    # (change) ExecStart=/usr/bin/dockerd -g /new/path/docker -H fd://
systemctl daemon-reload
systemctl start docker

Some useful command examples

# build
docker build -t deepaul -f Dockerfile.gpu .

# run a certain python through docker
docker run -it -v "$PWD":/app -w /app -e PYTHONPATH=/root/caffe-ssd/python deepaul python xxx.py

# run a certain python through docker
nvidia-docker run -rm -it \
    -p 8888:8888 -p 6006:6006 \
    -v /sharedfolder:/root/sharedfolder \
    deepaul zsh

# if GUI is needed
# useful links: http://somatorio.org/en/post/running-gui-apps-with-docker/
# useful links: http://wiki.ros.org/docker/Tutorials/GUI
nvidia-docker run -it --rm \
    --env="PYTHONPATH=/root/caffe-ssd/python" \
    --env="DISPLAY" \
    --workdir=/app \
    --volume="$PWD":/app \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix" \
    deepaul python

# nvidia-docker run --rm -it \
#    --user=$(id -u) \
#    --env="PYTHONPATH=/root/caffe-ssd/python" \
#    --env="DISPLAY" \
#    --workdir=/app \
#    --volume="$PWD":/app \
#    --volume="/etc/group:/etc/group:ro" \
#    --volume="/etc/passwd:/etc/passwd:ro" \
#    --volume="/etc/shadow:/etc/shadow:ro" \
#    --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
#    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
#    deepaul python test.py

# docker size 
docker system df
# (however) real size in the disk is
sudo du -hd 1 /var/lib/docker/aufs/diff | sort -hrk 1 | head -20

# docker reset
service docker stop 
sudo rm -rf /var/lib/docker/ && sudo rm -rf /var/lib/docker/image/aufs
service docker start 

ywp-docker's People

Contributors

ywpkwon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.