Environment: Windows 8.1
http://yaju3d.hatenablog.jp/entry/2016/04/07/011033 I tried to play with tensorflow with jupyter referring to the above site, but I could not upload the whole folder, so I thought it would be easy to upload if I shared Docker with Windows. : laughing:
However, it didn't go well and it took about an hour to share, so I thought it would be great if I could explain it in an easy-to-understand manner and expand the information. : eyes:
Download and install the Windows version of Docker from the site below. : runner: https://www.docker.com/products/docker-toolbox
① Launch "Docker Quickstart Terminal". ② 「docker run -p 8888:8888 -p 6006:6006 --name nobu_tensor -v //c/Users/nobu/tensorflow_share:/notebooks -it b.gcr.io/tensorflow/tensorflow」 In the docker terminal.
-Enter any container name for the value of the --name option. (Here, the container name is "nobu_tensor") -Enter the value of the -v option [Local folder path you want to share: Docker's folder path you want to share]. Here, "C: \ Users \ nobu \ tensorflow_share" is specified for the local shared folder. Please do not change notebooks Set the value of the -v option according to your environment.
③ Press "Ctrl + c" in the docker terminal. You will be asked "Shut down this notebook server (y / [n])?", Enter "y" and press enter. Doing so will stop the server once. ④ Enter "docker start nobu_tensor" in the docker terminal (the nobu_tensor part is the value of the name option entered in step ②). Please access the following site from your browser. jupyter will start. http://192.168.99.100:8888/ ④ Enter "docker exec -it nobu_tensor bash" in the docker terminal to put it in the container. (The nobu_tensor part is the value of the name option entered in step ②). ⑤ When you enter the container, it is already under the notebooks folder, so for example, if you enter "touch aaa.txt", a "aaa.txt" file will be created. Check if the file was created with the ls command. ⑥ By the way, when I open the shared folder (C: \ Users \ nobu \ tensorflow_share) specified locally, I am surprised. Contains "aaa.txt" created in the container! !! : grin: Furthermore, when I access http://192.168.99.100:8888/, I am surprised again. "Aaaa.txt" is appearing! !! !! : heart_eyes:
Now the docker and windows folders are shared, and the files are also shared to jupyter.
・ Play with Docker (3) Use Apache http://tech.pjin.jp/blog/2015/12/03/docker%E3%81%A7%E3%81%82%E3%81%9D%E3%81%B6%EF%BC%88%EF%BC%93%EF%BC%89apache%E3%82%92%E4%BD%BF%E3%81%86/ -Docker command cheat sheet http://qiita.com/voluntas/items/68c1fd04dd3d507d4083 ・ Do you want to enter the container? You can do it with docker exec http://qiita.com/yosisa/items/a5670e4da3ff22e9411a
Recommended Posts