Skip to content

Instantly share code, notes, and snippets.

@slitayem
Last active October 2, 2020 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slitayem/c0ef2c46231dd1e3b92fb2aec95631c0 to your computer and use it in GitHub Desktop.
Save slitayem/c0ef2c46231dd1e3b92fb2aec95631c0 to your computer and use it in GitHub Desktop.
Get tensorflow package version in the latest available GPU Docker image
#!/bin/bash
set -e
docker run -dit --rm --name test tensorflow/tensorflow:latest-gpu-py3-jupyter
TF_VERSION=`docker exec -it test bash -c "pip freeze | grep tensorflow-gpu | cut -d'=' -f3"`
TF_VERSION=`echo $TF_VERSION | tr -d '\r'`
docker stop test
echo "Tensorflow version: "${TF_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment