I am working with two docker images of tensorflow (latest and latest-gpu tags):
FROM tensorflow/tensorflow:latest-gpu
and:
FROM tensorflow/tensorflow:latest
In order to not have surprises in the future, I would like to set the version of these two images.
On docker hub, I can't find this information in the tags pages: for example, latest
would correspond to the 1.8.0-gpu
tag.
Do you know if and where I can find this information?
Thank you,
Alexandre
To see the images on your system, run the docker images or docker image ls command. If you check the output of either of the commands, you'll see that they list the available images, alongside their version tags, IDs, and other stuff. It's the version tag that we want here.
There's a way to check all version tags on Docker Hub (for example), against the local docker image's “Image ID”. You can get every tag from a Docker Registry (like Docker Hub), then use every tag you found, to get the image ID information from the manifest of every image.
The latest tag is applied by default to reference an image when you run Docker commands without specifying the tag value. The latest tag is applied to the most recent docker build or docker tag command that was run without a tag value explicitly set.
is kinda BULLPOOP actually that docker do NOT do what is minimum of good sense and report such thing, and unfortunately the only solution I seem to find is ... oh well, ACTUALLY FISHING:
go to image webpage (nigix in my case) https://hub.docker.com/_/nginx then press tags tab, go to any latest, and copy sha256 sum then sort by newest, then scroll down until first numbered version and check if the exact same sha256 is displayed
now ... STILL after that fishing, there library/nginxit comes a sure thing:
you can verify if you did it right, for example now I manage to find that nginx:latest is actually 1.17.8, so, I run:
docker pull nginx:1.17.8
1.17.8: Pulling from library/nginx
bc51dd8edc1b: Pull complete
66ba67045f57: Pull complete
bf317aa10aa5: Pull complete
Digest:sha256:ad5552c786f128e389a0263104ae39f3d3c7895579d45ae716f528185b36bc6f
Status: Downloaded newer image for nginx:1.17.8
and then I verify by atempt to pull latest:
docker pull nginx:latest
latest: Pulling from library/nginx
Digest: sha256:ad5552c786f128e389a0263104ae39f3d3c7895579d45ae716f528185b36bc6f
Status: Downloaded newer image for nginx:latest
how you can see it didn't actually pull anything, and sha256 is the exact same ;)
Do you know if and where I can find this information?
Just to make something clear. Docker images can have multiple tags around them. Closer inspection of said images reveal that they have single tag only (just latest
) so they are not tagged additionally. Thus said from images themselves you can't deduct which tensorflow version they relate to.
However, you do have other option:
Easiest way to make sure you use correct 'versioned' tensorflow image instead of latest
is to actually start latest image:
docker run -it --rm -p 8888:8888 tensorflow/tensorflow:latest
or
nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:latest-gpu
then, navigate to given url link in format:
http://localhost:8888/?token=XXXX...
and in jupyter create new notebook File->New Noteboot->Python2
and there check tensorflow version by giving:
import tensorflow as tf
print tf.VERSION
or
import tensorflow as tf
tf.__version__
Then run it. Note that in my case for latest
tag response was: 1.8.0
, however if you pulled latest
image a while ago and didn't update in the meantime (or reading this in the future) version you get can be different than this.
1.8.0
and 1.8.0-gpu
respectively (since I was offered Python2 from latest
tag).latest
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With