From e38dd31914edacdbad9d331ca2fd63f7f0faf66f Mon Sep 17 00:00:00 2001 From: vfdev Date: Thu, 7 Nov 2024 11:43:13 +0100 Subject: [PATCH 1/5] Updated pytorch version in CI and docker --- .github/workflows/pytorch-version-tests.yml | 2 +- docker/docker.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytorch-version-tests.yml b/.github/workflows/pytorch-version-tests.yml index 0ea40866aba..e14d46f2761 100644 --- a/.github/workflows/pytorch-version-tests.yml +++ b/.github/workflows/pytorch-version-tests.yml @@ -19,7 +19,7 @@ jobs: # will drop python version and related pytorch versions python-version: [3.8, 3.9, "3.10"] pytorch-version: - [2.3.1, 2.2.2, 2.1.2, 2.0.1, 1.13.1, 1.12.1, 1.10.0, 1.8.1] + [2.4.1, 2.3.1, 2.2.2, 2.0.1, 1.13.1, 1.12.1, 1.10.0, 1.8.1] exclude: # disabling python 3.9 support with PyTorch 1.7.1 and 1.8.1, to stop repeated pytorch-version test fail. # https://github.com/pytorch/ignite/issues/2383 diff --git a/docker/docker.cfg b/docker/docker.cfg index 6b976933347..d863eea10f7 100644 --- a/docker/docker.cfg +++ b/docker/docker.cfg @@ -1,4 +1,4 @@ [DEFAULT] -build_docker_image_pytorch_version = 2.4.0-cuda12.4-cudnn9 +build_docker_image_pytorch_version = 2.5.1-cuda12.4-cudnn9-devel build_docker_image_hvd_version = v0.28.1 build_docker_image_msdp_version = v0.14.0 From b9f0b175669e2e24b613c961151b2dee004c0023 Mon Sep 17 00:00:00 2001 From: vfdev Date: Thu, 7 Nov 2024 11:45:25 +0100 Subject: [PATCH 2/5] Fix docker tag --- docker/docker.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker.cfg b/docker/docker.cfg index d863eea10f7..7537dec68a6 100644 --- a/docker/docker.cfg +++ b/docker/docker.cfg @@ -1,4 +1,4 @@ [DEFAULT] -build_docker_image_pytorch_version = 2.5.1-cuda12.4-cudnn9-devel +build_docker_image_pytorch_version = 2.5.1-cuda12.4-cudnn9 build_docker_image_hvd_version = v0.28.1 build_docker_image_msdp_version = v0.14.0 From cd7cc11bffa0660cdcc7fd41d7691640d8430749 Mon Sep 17 00:00:00 2001 From: vfdev Date: Thu, 7 Nov 2024 12:16:40 +0100 Subject: [PATCH 3/5] Fix docker tag value removing +cu124 like words from torch version --- docker/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build.sh b/docker/build.sh index f3b460a3943..b6a8495137d 100644 --- a/docker/build.sh +++ b/docker/build.sh @@ -80,7 +80,7 @@ echo "opt_build_args: ${opt_build_args}" retry "docker build --build-arg PTH_VERSION=${pth_version} ${opt_build_args} -t pytorchignite/${image_name}:latest -f Dockerfile.${image_name} ." "\nBuild failed: ${image_name}" if [ -z $image_tag ]; then - image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"` + image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__.split('+')[0] + \"-\" + ignite.__version__, end=\"\")"` fi docker tag pytorchignite/${image_name}:latest pytorchignite/${image_name}:${image_tag} From 62a080f92d29ad76f92fca5fc0a9b35511ecb108 Mon Sep 17 00:00:00 2001 From: vfdev Date: Thu, 7 Nov 2024 12:26:28 +0100 Subject: [PATCH 4/5] Fix version compare in test_image --- docker/test_image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/test_image.py b/docker/test_image.py index ebb706c303f..77e1790d9c4 100644 --- a/docker/test_image.py +++ b/docker/test_image.py @@ -19,6 +19,11 @@ def check_package(package_name, expected_version=None): if expected_version is not None: assert hasattr(mod, "__version__"), f"Imported package {package_name} does not have __version__ attribute" version = mod.__version__ + # Remove all +something from the version name: e.g torch 2.5.1+cu124 + if "+" in version: + old_version = version + version = version.split("+")[0] + print(f"Transformed version: {old_version} -> {version}") assert ( version == expected_version ), f"Version mismatch for package {package_name}: got {version} but expected {expected_version}" From 0407757b5a6430b7ca4801a6de6d0981ad950507 Mon Sep 17 00:00:00 2001 From: vfdev Date: Thu, 7 Nov 2024 14:53:06 +0100 Subject: [PATCH 5/5] Fixed torch version in docker push_all.sh --- docker/push_all.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docker/push_all.sh b/docker/push_all.sh index ae8a84d4472..6951ff80c9b 100644 --- a/docker/push_all.sh +++ b/docker/push_all.sh @@ -26,11 +26,9 @@ echo $DOCKER_TOKEN | docker login --username=$DOCKER_USER --password-stdin set -xeu - if [ ${push_selected_image} == "all" ]; then - image_name="base" - image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"` + image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__.split('+')[0] + \"-\" + ignite.__version__, end=\"\")"` for image_name in "base" "vision" "nlp" "apex" "apex-vision" "apex-nlp" do @@ -40,9 +38,6 @@ if [ ${push_selected_image} == "all" ]; then done - image_name="hvd-base" - image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"` - for image_name in "hvd-base" "hvd-vision" "hvd-nlp" "hvd-apex" "hvd-apex-vision" "hvd-apex-nlp" do @@ -52,9 +47,6 @@ if [ ${push_selected_image} == "all" ]; then done # DEPRECATED due to no activity - # image_name="msdp-apex" - # image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"` - # for image_name in "msdp-apex" "msdp-apex-vision" "msdp-apex-nlp" # do @@ -66,7 +58,7 @@ if [ ${push_selected_image} == "all" ]; then else image_name=${push_selected_image} - image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"` + image_tag=`docker run --rm -i pytorchignite/${image_name}:latest python -c "import torch; import ignite; print(torch.__version__.split('+')[0] + \"-\" + ignite.__version__, end=\"\")"` docker push pytorchignite/${image_name}:latest docker push pytorchignite/${image_name}:${image_tag}