Sameer Mahajan
Sameer Mahajan

Reputation: 598

readymade docker image for tensorflow to predownload

Is there a readymade docker image for pre installed tensorflow available for downloading in advance? I know about gcr.io/tensorflow/tensorflow. However as I know it you have to run docker to first download it. I think eventual runs happen from the already downloaded copy.

I want to download it manually in advance for using later. I tried:

$ docker image pull gcr.io/tensorflow/tensorflow

but it gave me error:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.32/images/create?fromImage=gcr.io%2Ftensorflow%2Ftensorflow&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

Upvotes: 0

Views: 83

Answers (1)

Stefano
Stefano

Reputation: 5076

your user should have the docker group assigned. The docker service has to run on that machine as well.

Assuming you're on a linux machines, to add the group, you can simply execute:

sudo usermod -a -G docker $USERNAME

To save the image on your machine, you can execute the following command:

docker save --output image.tar $IMAGE

NOTE: the file can be big, so I suggest to run also

gzip -9 image.tar

Another version of this command is:

docker save $IMAGE | gzip > myimage.tgz

I forgot to mention that on the other machine you'll have to load this image.

gunzip -c myimage.tgz | docker load

For more info:

https://docs.docker.com/engine/reference/commandline/save/ https://docs.docker.com/engine/reference/commandline/load/

Upvotes: 1

Related Questions