Skip to content
Permalink
Browse files

Remove temporary docker containers after reading horovod/tensorflow/p…

…ytorch/mxnet versions. (#1467)

Signed-off-by: Jesse Benson (AI) <jesseb@microsoft.com>
  • Loading branch information
jessebenson authored and tgaddair committed Oct 26, 2019
1 parent 872b879 commit f7e8d4e007329508a3d3d4f82c24e10487b6b27a
Showing with 4 additions and 4 deletions.
  1. +4 −4 build-docker-images.sh
@@ -15,10 +15,10 @@ function build_one()

tag=horovod-build-py${py}-${device}:$(date +%Y%m%d-%H%M%S)
docker build -f Dockerfile.${device} -t ${tag} --build-arg python=${py} --no-cache .
horovod_version=$(docker run ${tag} pip freeze | grep ^horovod= | awk -F== '{print $2}')
tensorflow_version=$(docker run ${tag} pip freeze | grep ^${tensorflow_pkg}= | awk -F== '{print $2}')
pytorch_version=$(docker run ${tag} pip freeze | grep ^torch= | awk -F== '{print $2}' | awk -F+ '{print $1}')
mxnet_version=$(docker run ${tag} pip freeze | grep ^mxnet | awk -F== '{print $2}')
horovod_version=$(docker run --rm ${tag} pip freeze | grep ^horovod= | awk -F== '{print $2}')
tensorflow_version=$(docker run --rm ${tag} pip freeze | grep ^${tensorflow_pkg}= | awk -F== '{print $2}')
pytorch_version=$(docker run --rm ${tag} pip freeze | grep ^torch= | awk -F== '{print $2}' | awk -F+ '{print $1}')
mxnet_version=$(docker run --rm ${tag} pip freeze | grep ^mxnet | awk -F== '{print $2}')
final_tag=horovod/horovod:${horovod_version}-tf${tensorflow_version}-torch${pytorch_version}-mxnet${mxnet_version}-py${py}-${device}
docker tag ${tag} ${final_tag}
docker rmi ${tag}

0 comments on commit f7e8d4e

Please sign in to comment.
You can’t perform that action at this time.