Docker Community Forums

Share and learn in the Docker community.

Problem running


(Zehandai2018) #1

I’m a new to docker and I’m trying to use the Docker Tensorflow to make an image classifier.

I tried to run this py script but error occurred.

root@4a44e2a12d7d:/tensorflow# python ./tf_files/ ./tf_files/flower_photos/dandelion/6900157914_c3387c11d8.jpg
Traceback (most recent call last):
File “./tf_files/”, line 14, in
in tf.gfile.GFile("/tf_files/retrained_labels.txt")]
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/”, line 208, in next
retval = self.readline()
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/”, line 177, in readline
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/”, line 79, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/”, line 473, in exit
tensorflow.python.framework.errors_impl.NotFoundError: /tf_files/retrained_labels.txt; No such file or directory

I’m sure the files are in the path:
root@4a44e2a12d7d:/tensorflow/tf_files# ls
bottlenecks flower_photos flower_photos.tgz inception retrained_graph.pb retrained_labels.txt

And the path in the .py file should be right

the original script in Github is here:

I also tried ‘chmod 777 -R /tf_files/’, as some ones in google said and it does not work.

Have any encountered similar problem before?

(Sdetweil) #2

the message says

/tf_files/retrained_labels.txt; No such file or directory


/tensorflow/tf_files/retrained_labels.txt; No such file or directory

the app is expecting /tf_files to be in the ROOT of the volume

you have it in a subfolder called tensorflow

(Zehandai2018) #3

Yes! Finally I made it run! Thank you !!