Setting up Docker and TensorFlow for Windows
Docker is a system to build self contained versions of a Linux operating system running on your machine. When you install and run TensorFlow via Docker it completely isolates the installation from pre-existing packages on your machine.
Windows 10 or newer:
Download the Docker installer here.
Launch Docker when the installer finishes
If Docker warns you about Hyper-V not being enabled, allow Docker to enable Hyper-V and automatically restart your machine
- Open PowerShell or ‘cmd.exe’ and run the Docker hello-world image to ensure Docker is working properly
docker run hello-world
The legacy solution for older Windows systems is Docker Toolbox.
Click on the "Get Docker Toolbox for Windows" button.
Follow their instructions to install Docker and to make sure that virtualization is enabled on your machine.
Pull the tensorflow docker image:
docker pull tensorflow/tensorflow
- Test running the Docker TensorFlow image:
docker run -it -p 8888:8888 tensorflow/tensorflow
- Copy the URL with your login Jupyter login token from PowerShell and go to it in your web browser
If you were able to access the page, Docker and TensorFlow have been installed correctly.
Connecting & Launching the TensorFlow Lab
Note: For this lab, we are cloning the Image-Classification-TensorFlow repo to the root of our C: drive, you can put it anywhere you like, but the rest of the tutorial will assume it is located at:
Clone the github repo https://github.com/AccelAI/Image-Classification-TensorFlow.git
Enable sharing of the drive you cloned the repo to in Docker
- Right Click on the Docker System Try icon.
- Click ‘Settings’
- Go to ‘Shared Drives’ and check the box for the drive is located on.
- Click ‘Apply’
Open a new PowerShell
Run the TensorFlow docker image and mount the notebooks.
docker run -it -p 8888:8888 -p 6006:6006 -v //c/Image-Classification-TensorFLow-master:/notebooks tensorflow/tensorflow
In your browser, navigate to URL provided by Docker inside of PowerShell
Ensure that the notebooks for the lab are available.
Return to the lab README for further instructions.