diff --git a/.github/workflows/unified-docker.yml b/.github/workflows/unified-docker.yml index c5fbf189..f7f36aea 100644 --- a/.github/workflows/unified-docker.yml +++ b/.github/workflows/unified-docker.yml @@ -68,13 +68,6 @@ jobs: fail-fast: false matrix: backend: ${{ fromJSON(needs.setup.outputs.matrix) }} - variant: - - name: root - uid: "0" - suffix: "" - - name: rootless - uid: "10001" - suffix: "-rootless" steps: - name: Checkout code uses: actions/checkout@v4 @@ -106,15 +99,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build unified Docker image (${{ matrix.backend }}, ${{ matrix.variant.name }}) + - name: Build unified Docker image (${{ matrix.backend }}) env: LLAMA_REF: ${{ inputs.llama_cpp_ref || 'master' }} WHISPER_REF: ${{ inputs.whisper_ref || 'master' }} SD_REF: ${{ inputs.sd_ref || 'master' }} IK_LLAMA_REF: ${{ inputs.ik_llama_ref || 'main' }} LS_VERSION: ${{ inputs.llama_swap_version || 'main' }} - RUN_UID: ${{ matrix.variant.uid }} - DOCKER_IMAGE_TAG: ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}${{ matrix.variant.suffix }} + DOCKER_IMAGE_TAG: ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }} # When running under act, use the local builder that has warm ccache. # On GitHub Actions, BUILDX_BUILDER is unset so docker uses the builder # created by setup-buildx-action above. @@ -126,8 +118,14 @@ jobs: - name: Push to GitHub Container Registry if: ${{ !env.ACT }} run: | - TAG="ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}${{ matrix.variant.suffix }}" - docker push "${TAG}" + BASE_TAG="ghcr.io/mostlygeek/llama-swap:unified-${{ matrix.backend }}" DATE_TAG=$(date -u +%Y-%m-%d) - docker tag "${TAG}" "${TAG}-${DATE_TAG}" - docker push "${TAG}-${DATE_TAG}" + + docker push "${BASE_TAG}" + docker tag "${BASE_TAG}" "${BASE_TAG}-${DATE_TAG}" + docker push "${BASE_TAG}-${DATE_TAG}" + + ROOTLESS_TAG="${BASE_TAG}-rootless" + docker push "${ROOTLESS_TAG}" + docker tag "${ROOTLESS_TAG}" "${ROOTLESS_TAG}-${DATE_TAG}" + docker push "${ROOTLESS_TAG}-${DATE_TAG}" diff --git a/docker/unified/build-image.sh b/docker/unified/build-image.sh index e03cbbe7..d24c6749 100755 --- a/docker/unified/build-image.sh +++ b/docker/unified/build-image.sh @@ -201,7 +201,6 @@ BUILD_ARGS=( --build-arg "SD_COMMIT_HASH=${SD_HASH}" --build-arg "IK_LLAMA_COMMIT_HASH=${IK_LLAMA_HASH}" --build-arg "LS_VERSION=${LS_HASH}" - --build-arg "RUN_UID=${RUN_UID:-0}" -t "${DOCKER_IMAGE_TAG}" -f "${SCRIPT_DIR}/Dockerfile" ) @@ -255,12 +254,33 @@ if [[ "$BACKEND" == "cuda" ]]; then fi echo "All expected binaries verified: ${VERIFIED_LIST}" +echo "" +echo "==========================================" +echo "Building rootless image..." +echo "==========================================" +echo "" + +ROOTLESS_TAG="${DOCKER_IMAGE_TAG}-rootless" +docker buildx build --load -t "${ROOTLESS_TAG}" - <