How to share folders with Docker and Windows with tensorflow

Environment: Windows 8.1

[Background]: sunny:

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:

[Preparation]: cyclone:

Download and install the Windows version of Docker from the site below. : runner:   https://www.docker.com/products/docker-toolbox

[Folder sharing procedure]: rocket:

① 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.

[Reference site]

・ 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

How to share folders with Docker and Windows with tensorflow
[How to!] Learn and play Super Mario with Tensorflow !!
[Linux] How to subdivide files and folders
How to use Cmder with PyCharm (Windows)
How to use tensorflow under docker environment
How to install python3 with docker centos
How to process camera images with Teams and Zoom Sentiment analysis with Tensorflow
How to delete log with Docker, not to collect log
How to get started with the 2020 Python project (windows wsl and mac standardization)
How to extract null values and non-null values with pandas
How to loop and play gif video with openCV
[TensorFlow] I want to process windows with Ragged Tensor
I tried to implement Grad-CAM with keras and tensorflow
How to operate Firefox with selenium on Windows Memo
Summary of how to share state with multiple functions
[TF] How to save and load Tensorflow learning parameters
[IPython] How to Share IPython Notebook
How to install Python [Windows]
How to update with SQLAlchemy?
How to cast with Theano
How to Alter with SQLAlchemy?
How to separate strings with','
How to RDP with Fedora31
How to Delete with SQLAlchemy?
How to share OS and Vim clipboard on Ubuntu 18.04.3 LTS
How to learn TensorFlow for liberal arts and Python beginners
How to do Bulk Update with PyMySQL and notes [Python]
How to implement Python EXE for Windows in Docker container
How to create dataframes and mess with elements in pandas
How to log in to AtCoder with Python and submit automatically
How to set a shortcut to switch full-width and half-width with IBus
How to cancel RT with tweepy
Python: How to use async with
Python 3.6 on Windows ... and to Xamarin.
Easy Slackbot with Docker and Errbot
How to install and use Tesseract-OCR
How to use Dataiku on Windows
Create folders from '01' to '12' with python
How to import CSV and TSV files into SQLite with Python
How to use virtualenv with PowerShell
How to deal with imbalanced data
How to install python-pip with ubuntu20.04LTS
How to deal with imbalanced data
How to make a surveillance camera (Security Camera) with Opencv and Python
How to install pycrypto on Windows
How to deploy django-compressor on Windows
How to run Jupyter and Spark on Mac with minimal settings
How to install pandas on EC2 (How to deal with MemoryError and PermissionError)
How to use jupyter notebook without polluting your environment with Docker
How to get started with Scrapy
How to get started with Python
How to install TensorFlow on CentOS 7
How to deal with DistributionNotFound errors
How to install and configure blackbird
How to use .bash_profile and .bashrc
How to get started with Django
How to install CUDA and nvidia-driver
How to install and use Graphviz
How to deal with errors when installing Python and pip with choco
How to Data Augmentation with PyTorch
Explain how to use TensorFlow 2.X with implementation of VGG16 / ResNet50