fix: re-declare ARG TARGETARCH in each Dockerfile stage

Docker automatic platform ARGs are only in scope for FROM instructions.
$TARGETARCH in RUN commands was always empty, so the deadsnakes PPA
conditional never ran and python3.13 could not be found on the Ubuntu
22.04 CUDA base.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 04:30:00 +00:00
co-authored by Claude Sonnet 4.6
parent a8bdbcdd66
commit 619a96b8c3
3 changed files with 9 additions and 1 deletions
+2
View File
@@ -10,6 +10,7 @@ ARG TARGETARCH
FROM base-${TARGETARCH} AS build
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive
# amd64 (Ubuntu 22.04 CUDA base): Python 3.13 via deadsnakes PPA
@@ -47,6 +48,7 @@ RUN chmod +x /app/entrypoint.sh
FROM base-${TARGETARCH} AS runtime
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \