Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No such file or directory" when starting convolutional.py script on tensorflow docker image

I don't have a Linux or Mac machine so in order to check out TensorFlow on Windows, installed docker and downloaded the image of tensorflow-full. When I run the following command:

$ python tensorflow/models/image/mnist/convolutional.py

I get this error message:

C:\Users\Javiar\Anaconda\python.exe: can't open file 'tensorflow/models/image/mnist/convolutional.py': [Errno 2] No such file or directory

Currently on Win 8.1 and have anaconda installed.

like image 990
Javiar Sandra Avatar asked Dec 18 '25 20:12

Javiar Sandra


1 Answers

It looks like the error message is caused by trying to execute a script file (.../convolutional.py) that is inside the container, using the Python interpreter outside the container.

First of all, follow the steps here to ensure that Docker is configured successfully on your Windows machine:

http://docs.docker.com/engine/installation/windows/#using-docker-from-windows-command-prompt-cmd-exe

Once you've successfully run the hello-world container, run the following command to start the TensorFlow container:

docker run -it b.gcr.io/tensorflow/tensorflow

(Note that, depending on your terminal, the previous step may or may not work. A common error is cannot enable tty mode on non tty input. In that case, run the following command to connect to the VM that is hosting the containers:

docker-machine ssh default

...then at the resulting prompt, the docker run command again.)

At the resulting prompt, you should be able to run the script with the following command:

python /usr/local/lib/python2.7/dist-packages/tensorflow/models/image/mnist/convolutional.py
like image 136
mrry Avatar answered Dec 20 '25 09:12

mrry