From 218803b7c8e9564ffe097a15df12243d6e823e51 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 11 Nov 2024 19:14:06 -0800 Subject: [PATCH] add pypi version to docker tag --- llama_stack/distribution/build_container.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llama_stack/distribution/build_container.sh b/llama_stack/distribution/build_container.sh index d0874d99f..81d8811e5 100755 --- a/llama_stack/distribution/build_container.sh +++ b/llama_stack/distribution/build_container.sh @@ -140,6 +140,13 @@ if command -v selinuxenabled &>/dev/null && selinuxenabled; then DOCKER_OPTS="$DOCKER_OPTS --security-opt label=disable" fi +if [ -n "$TEST_PYPI_VERSION" ]; then + image_name="$image_name-test-$TEST_PYPI_VERSION" +else + URL="https://pypi.org/pypi/llama-stack/json" + image_name="$image_name-$(curl -s $URL | jq -r '.info.version')" +fi + set -x $DOCKER_BINARY build $DOCKER_OPTS -t $image_name -f "$TEMP_DIR/Dockerfile" "$REPO_DIR" $mounts