Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
• Packaging the application into 'Containers’.
• Instead of running the code we run the Container.
• Application code, the libraries and dependencies needed
to run the application
• Portable, self sufficient, run anywhere
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
https://hub.docker.com/r/microsoft/cntk/
~$ docker pull microsoft/cntk # This will get the latest image, which today
means latest available GPU runtime configuration.
~$ docker pull microsoft/cntk:2.1-cpu-python3.5 # To get a specific
configuration you need to add a tag. This will get you CNTK 2.1 CPU runtime
configuration set up for Python 3.5.
~$docker images
REPOSITORY TAG IMAGE ID
CREATED SIZE
microsoft/cntk 2.1-cpu-python3.5 57f6b9f1b27c 2
months ago 6.74GB
Container Shell
docker run -it -p 8888:8888 --name cntkdemo1 microsoft/cntk:2.1-cpu-python3.5 bash -c
"source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 --
notebook-dir=/cntk/Tutorials --allow-root"
Demystifying Docker for Data Scientists by Shaheen
Jupyter Notebook
Demystifying Docker for Data Scientists by Shaheen
Ctrl + p + q
# To leave a
container running
# should see the
running container
cntkdemo2 listed
Copy files from local folder to a folder in the container (can be
running or stopped)
docker exec
docker cp
Demystifying Docker for Data Scientists by Shaheen
cntkwlgbm:version1
Curse of the Golden Image
Demystifying Docker for Data Scientists by Shaheen
docker build -t=“Image_Name" .
$~ cd C:UsersgshaheenDocumentsDockermylightgbmex
$~ docker build -t="mycntkwlgbmimage" . #takes few minutes
$~ docker images # should see mycntkwlgbmimage
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
https://hub.docker.com/r/tensorflow/tensorflow/
~$ docker pull tensorflow/tensorflow # This will get the latest image
for CPU only container
~$ docker pull tensorflow/tensorflow:latest-gpu # This will get
the latest image for GPU (CUDA) container (Install nvidia-docker)
~$docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
tensorflow/tensorflow latest a61a91cc0d1b 3 weeks ago
1.25GB
microsoft/cntk 2.2-cpu-python3.5 57f6b9f1b27c 2 months ago
6.74GB
docker run -it -p 8888:8888 tensorflow/tensorflow
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen

More Related Content

Demystifying Docker for Data Scientists by Shaheen

  • 3. • Packaging the application into 'Containers’. • Instead of running the code we run the Container. • Application code, the libraries and dependencies needed to run the application • Portable, self sufficient, run anywhere
  • 11. ~$ docker pull microsoft/cntk # This will get the latest image, which today means latest available GPU runtime configuration. ~$ docker pull microsoft/cntk:2.1-cpu-python3.5 # To get a specific configuration you need to add a tag. This will get you CNTK 2.1 CPU runtime configuration set up for Python 3.5. ~$docker images REPOSITORY TAG IMAGE ID CREATED SIZE microsoft/cntk 2.1-cpu-python3.5 57f6b9f1b27c 2 months ago 6.74GB
  • 13. docker run -it -p 8888:8888 --name cntkdemo1 microsoft/cntk:2.1-cpu-python3.5 bash -c "source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 -- notebook-dir=/cntk/Tutorials --allow-root"
  • 17. Ctrl + p + q # To leave a container running # should see the running container cntkdemo2 listed
  • 18. Copy files from local folder to a folder in the container (can be running or stopped)
  • 24. $~ cd C:UsersgshaheenDocumentsDockermylightgbmex $~ docker build -t="mycntkwlgbmimage" . #takes few minutes $~ docker images # should see mycntkwlgbmimage
  • 28. ~$ docker pull tensorflow/tensorflow # This will get the latest image for CPU only container ~$ docker pull tensorflow/tensorflow:latest-gpu # This will get the latest image for GPU (CUDA) container (Install nvidia-docker) ~$docker images REPOSITORY TAG IMAGE ID CREATED SIZE tensorflow/tensorflow latest a61a91cc0d1b 3 weeks ago 1.25GB microsoft/cntk 2.2-cpu-python3.5 57f6b9f1b27c 2 months ago 6.74GB
  • 29. docker run -it -p 8888:8888 tensorflow/tensorflow