From 27990045ff08cbc251716d1089e73d1a49ce41e7 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Mon, 26 Feb 2024 15:49:54 -0800 Subject: [PATCH] docker: Only match tags that start with v* (#120670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid issues where version could be confused with a ciflow tag. Example: ``` ❯ git describe --tags --always ciflow/periodic/c3496d50f0bb437c70f27085f71155209277bfd4-47-g4ca24959d1a ❯ git describe --tags --always --match "v[1-9]*.*" v1.8.0-rc1-36500-g4ca24959d1a ``` Resolves https://github.com/pytorch/pytorch/issues/120392 Signed-off-by: Eli Uriegas Pull Request resolved: https://github.com/pytorch/pytorch/pull/120670 Approved by: https://github.com/kit1980, https://github.com/atalman --- docker.Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker.Makefile b/docker.Makefile index 0129ca447ab1..3975091c2de0 100644 --- a/docker.Makefile +++ b/docker.Makefile @@ -21,7 +21,8 @@ CUDA_CHANNEL = nvidia INSTALL_CHANNEL ?= pytorch PYTHON_VERSION ?= 3.10 -PYTORCH_VERSION ?= $(shell git describe --tags --always) +# Match versions that start with v followed by a number, to avoid matching with tags like ciflow +PYTORCH_VERSION ?= $(shell git describe --tags --always --match "v[1-9]*.*") # Can be either official / dev BUILD_TYPE ?= dev BUILD_PROGRESS ?= auto