Search

Setup Tensorflow on Windows using Docker

| 0 Comments
tensorflow docker



Tensorflow installed in docker (kitematic)


Just Started working on a project which use libraries including Tensorflow.

here are the steps to use Tensorflow on Windows (using Docker).

docker run -it -p 8888:8888 tensorflow/tensorflow

docker run -it -p 8888:8888 -p 6006:6006 -v "$(pwd):/home" tensorflow/tensorflow

in case image is not downloaded previously(from terminal or kitematic), image will be downloaded automatically

where pwd is current current directory path and home is your mount point (can be any name)

note: make sure docker has permission to access drive. see post to mount drive.


Access bash, to run commands / program

(make sure to close existing conainer, like above one)

Tensorflow bash access in docker

docker exec -it <name_or_id> bash

name or id is container name or id (see kitematic or run doker ps) to see name/id of container.

now you can run all linux commands to access files, programs in the container.

e.g.

ls to list all files and folders in current directory

cd .. to go to parent directory.

python <file_name>.py to run python program


common issues:

reference

https://github.com/tensorflow/tensorflow

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/README.md

https://hub.docker.com/r/tensorflow/tensorflow/