Use the following command:
docker pull c3h3/oblas-py278-shogun-ipynb
to pull the docker images with python2.7.8 + Openblas + numpy1.8.2 + scipy0.14.0 + pandas + ipython + ... + shogun
This image is on the docker hub: https://registry.hub.docker.com/u/c3h3/oblas-py278-shogun-ipynb/
(if you want to add more packages, you can also download the Dockerfile from its github repo: https://github.com/c3h3/docker-oblas-py278-data/tree/shogun-ipynb)
with command:
docker images
you can see the images in the list ...
!docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE c3h3/oblas-py278-shogun-ipynb latest 408c81556ef6 13 hours ago 3.065 GB c3h3/oblas-py278-shogun latest 69d038c4edb3 23 hours ago 3.059 GB c3h3/oblas-py278-data latest 85b19ee1461b 30 hours ago 2.515 GB debian jessie 71d9d77ae89e 3 days ago 121.9 MB c3h3/oblas-py278-scipy-base latest b5f49d1d0a55 5 days ago 2.097 GB
Before runing docker instance, we must have a outside volume which contains our codes, data, or ipython notebooks ...
We want to mount this workdir as the /ipynbs dir inside docker instance.
Here we use the Github Repository: https://github.com/c3h3/oblas-py278-shogun-demo
as our workdir ...
! git clone https://github.com/c3h3/oblas-py278-shogun-demo /home/c3h3/demo_ipynbs
Cloning into '/home/c3h3/demo_ipynbs'... remote: Counting objects: 89, done. remote: Compressing objects: 100% (77/77), done. remote: Total 89 (delta 16), reused 65 (delta 2) Unpacking objects: 100% (89/89), done. Checking connectivity... done.
!ls /home/c3h3/demo_ipynbs
data demo_ipynbs README.md shogun-ipynbs
After cloning, we need to download the data submodule ...
So that we could use those data demo later on ...
! cd /home/c3h3/demo_ipynbs && git submodule init && git submodule update
Submodule 'data' (https://github.com/shogun-toolbox/shogun-data.git) registered for path 'data' Cloning into 'data'... remote: Counting objects: 4659, done. remote: Total 4659 (delta 0), reused 0 (delta 0) Receiving objects: 100% (4659/4659), 330.62 MiB | 2.19 MiB/s, done. Resolving deltas: 100% (1380/1380), done. Checking connectivity... done. Submodule path 'data': checked out '24b8341a99fc2d3e2ad40f372578ea91bdbedaf6'
After init & update submodule
git submodule init && git submodule update
we will have the testing data in our repository ... Submodule: shogun-data
!ls /home/c3h3/demo_ipynbs/data
AAM arts att_dataset faces lang_detection msplicer multilabel README.md tapkee toy ANPR asp easysvm ica logdet multiclass ocr SIFT testsuite
with the command on the website https://registry.hub.docker.com/u/c3h3/oblas-py278-shogun-ipynb/
docker run -p forward_port:8888 -v outside_ipynbs:/ipynbs -d c3h3/oblas-py278-shogun-ipynb
we can easily setting the parameters: forward_port and outside_ipynbs
(with forward_port=8080 and outside_ipynbs=/home/c3h3/demo_ipynbs)
to run the docker images directly ...
!docker run -p 8080:8888 -v /home/c3h3/demo_ipynbs:/ipynbs -d c3h3/oblas-py278-shogun-ipynb
73f210130fc6dad36489bb28490f17254252018a90d3b51b93f431b2b9910cdd
with command
docker ps
or
docker ps -a
you could checkout the all running images, just like the bash command
ps -aux
!docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 73f210130fc6 c3h3/oblas-py278-shogun-ipynb:latest "/bin/sh -c 'ipython 3 seconds ago Up 2 seconds 0.0.0.0:8080->8888/tcp kickass_fermi
!docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 73f210130fc6 c3h3/oblas-py278-shogun-ipynb:latest "/bin/sh -c 'ipython 3 seconds ago Up 3 seconds 0.0.0.0:8080->8888/tcp kickass_fermi
!ps -a
PID TTY TIME CMD 4546 pts/12 00:00:03 ipython 5803 pts/24 00:00:45 htop 10518 pts/12 00:00:02 python2.7 11913 pts/25 00:00:00 ps
please open http://localhost:8080 with browser ...
After working with ipython notebook and shogun, you could use the command:
docker stop name_or_hashkey && docker rm name_or_hashkey
to stop and remove your running instance,
where name_or_hashkey is your running instance's name or hashkey (here is hashkey 75ffa514c628)
!docker stop 73f210130fc6 && docker rm 73f210130fc6
73f210130fc6 73f210130fc6
After Stoping instance, use
docker ps
check again ...
!docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES