From 29cd98878dd649ab21db66dd8ebd2e907bee7dbb Mon Sep 17 00:00:00 2001 From: Benson Wong Date: Sun, 9 Mar 2025 13:02:06 -0700 Subject: [PATCH] better container build logic when upstream containers do not exist --- .github/workflows/containers.yml | 1 + docker/build-container.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index b3db047..cdfd1b8 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -16,6 +16,7 @@ jobs: strategy: matrix: platform: [intel, cuda, vulkan, cpu, musa] + fail-fast: false steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/docker/build-container.sh b/docker/build-container.sh index d7c02c4..c3c225b 100755 --- a/docker/build-container.sh +++ b/docker/build-container.sh @@ -38,6 +38,12 @@ else | jq -r --arg arch "$ARCH" '.[] | select(.metadata.container.tags[] | startswith("server-\($arch)")) | .metadata.container.tags[]' \ | sort -r | head -n1 | awk -F '-' '{print $3}') + # Abort if LCPP_TAG is empty. + if [[ -z "$LCPP_TAG" ]]; then + echo "Abort: Could not find llama-server container for arch: $ARCH" + exit 1 + fi + CONTAINER_TAG="ghcr.io/mostlygeek/llama-swap:v${LS_VER}-${ARCH}-${LCPP_TAG}" CONTAINER_LATEST="ghcr.io/mostlygeek/llama-swap:${ARCH}" echo "Building ${CONTAINER_TAG} $LS_VER"