提供amiについて

19
提供AMIについて Preferred Networks Inc. 野健太 [email protected] 2015/7/13 本神経回学会主催セミナー Deep Learningを使ってみよう!」

Upload: kenta-oono

Post on 05-Aug-2015

351 views

Category:

Documents


3 download

TRANSCRIPT

1. AMI Preferred Networks Inc. [email protected] 2015/7/13 Deep Learning 2. 2015/7/6 2015/7/7AMI(Dockerfile) 2015/7/12AMIAMI IDAMIURL 2 3. 201591Deep Learning http://www.jnns.org/DeepSeminar2/home.html AMI AMI $ ls $ 3 4. Caffe 71(7d3a8e9) Chainer 77v1.1.0 4 5. AMI AMI AMI AMI 5 6. AMI 7. AWS AMIAWS Deep LearningAWS http://www.jnns.org/DeepSeminar2/home.html#account AWSAmazon WebService AMIAmazon Machine Image AWSAMI AMI 7 8. AMI AMI 7/12AMIAMIAMI ID AMIJNNS2015-caffe-chainer-20150713 AMI IDami-9d2d2ead 561361918086 URLhttps://console.aws.amazon.com/ec2/v2/home?region=us-west- 2#LaunchInstanceWizard:ami=ami-9d2d2ead 8 9. AMICaffe Chainer AMIubuntu : root, caffe, chainer sudoer=sudo Caffe (CPU Only): /opt/caffe (=$CAFFE_ROOT) caffe Chainer (CPU Only) /usr()pip /home/chainer Ubuntu14.04 Ubuntu14.04 Caffe Chainer HW(AWS) AMI 9 10. AMIubuntulogin.sh $ cd # $ ./login.sh # logoutCtrl-Dlogin.sh 10 11. example(Caffe) example http://caffe.berkeleyvision.org/ga thered/examples/mnist.html $ cd /opt/caffe # move to $CAFFE_ROOT $ ./data/mnist/get_mnist.sh $ ./examples/mnist/create_mnist.sh (libdc1394 error: Failed to initialize libdc1394 ) CPU examples/mnist/lenet_solver.prototxt solver_mode: GPU solver_mode: CPU $ ./examples/mnist/train_lenet.sh 11 12. example examplecaffepip example caffeCPU $ cd # $ pip install scikit-learn scipy # example $ git clone https://github.com/pfnet/chainer.git $ python chainer/examples/mnist/train_mnist.py 12 13. AMI 14. CaffeChainerOS(Ubuntu) DockerfileDocker Image AMIDocker Imagepull Host OSDocker Container Container github https://github.com/delta2323/JNNS2015- tutorial Dockerfile https://registry.hub.docker.com/u/delta2323/jn ns2015-tutorial/ Ubuntu(Host) Docker Engine Docker Container Ubuntu(Guest) Caffe Chaine r HW(AWS) AMI Dockerfile 14 15. Docker Dockerfile Dockerfile Dockerfile Dockerfilehttps://docs.docker.com/reference/builder/ 15 16. Dockerfile Docker + CaffeDockerfile https://github.com/tleyden/docker/tree/master/caffe RootCaffeCaffe CAFFE_ROOT(/opt/caffe)Caffe ChainerChainer ssh http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/ 16 17. Docker Container Docker Container publishdocker0 $ docker run -d -p 22 -- name=caffe_chainer delta2323/jnn s2015-tutorial DockerOS sshd docker0ssh Ubuntu(Host) Docker Container Ubuntu(Guest) 22 docker0 xxx eth0 22 17 18. Docker Containerssh Docker0IP $ DOCKER_HOST=`ip -f inet -o addr show docker0 | cut -d -f 7 | cut -d/ -f 1` Docker $ CONTAINER_PORT=`docker inspect - f {{ if index .NetworkSettings.Ports 22/tcp }}{{(index (index .NetworkSetti ngs.Ports 22/tcp) 0).HostPort}}{{ end }} caffe_chainer` $ ssh root@${DOCKER_HOST} -p ${CONTAINER_PORT} 18 19. Docker Dockerfile Docker Hub Docker AWS2 2 AWS+Docker 19