Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deploy docker for DL project

afun
November 17, 2018

Deploy docker for DL project

afun

November 17, 2018
Tweet

More Decks by afun

Other Decks in Programming

Transcript

  1. • DL environment relies on system hardware ◦ CUDA ◦

    cuDNN • DL framework relies on system library ◦ tensorflow 1.4.1 > CUDA 8 ◦ tensorflow 1.5 > CUDA 9 • Isolate the project environment ◦ python2 vs. python3 ◦ python3.5 vs. python3.6 ◦ different package requirement across the different project Why should I use it? hardware CUDA, cuDNN keras, tensorflow ... python package isolation
  2. Ubuntu Server Docker Image screen / tmux data code mount

    port binding :8888 :9888 local port forwarding :9888 browser preview
  3. Docker instruction $ docker rmi beetle-action:py36 # delete image by

    name $ docker rmi fe2255258306 # delete image by id
  4. Docker instruction $ docker ps # list the container $

    docker ps -a # list all containers $ docker rm c0aa8680536f # delete container
  5. Ubuntu Server Docker Image screen / tmux data code mount

    port binding :8888 :9888 local port forwarding :9888 browser preview
  6. Activate Docker and Mount the project $ screen -R project-docker

    # Enter the screen $ nvidia-docker run \ -v ~/myProject:/root/project \ -v ~/myData:/root/project/data \ -v ~/myOutput:/root/project/output \ -p 9888:8888 \ -p 7006:6006 \ -it myDockerImage /bin/bash mount code / data/ output mount port • jupyter 8888 • tensorboard 6006 the command after the docker image activation e.g. nvidia/cuda:latest interactive mode Reference: docker run | Docker Documentation
  7. Ubuntu Server Docker Image screen / tmux data code mount

    port binding :8888 :9888 local port forwarding :9888 browser preview
  8. Activate jupyter in Docker image Because we are the root

    user in the docker image, we should activate jupyter with the paramter --allow-root $ jupyter notebook --allow-root
  9. SSH - port forwarding $ ssh -NfL 9888:localhost:9888 USER@SERVER-IP If

    the connection still unreachable, please check the port usage with the following instruction in each phase $ netstat -altnp