From c59acb5e315399a65fbeae141e7bc2d32305b779 Mon Sep 17 00:00:00 2001 From: Holden Date: Fri, 12 Jun 2026 04:02:49 +0000 Subject: [PATCH] fix: use Ubuntu 24.04 for arm64 base to avoid deadsnakes PPA under QEMU add-apt-repository ppa:deadsnakes/ppa fails on arm64 in GitHub Actions because QEMU emulation doesn't support the GPG agent. Ubuntu 24.04 ships Python 3.12 natively so the PPA is not needed. amd64 (CUDA/Ubuntu 22.04 base) still uses the PPA. PPA install is now gated on TARGETARCH=amd64. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2214041..e5a6502 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # ── Platform-conditional base ───────────────────────────────────────────── # amd64: NVIDIA CUDA 12.6 (GPU acceleration when available, CPU fallback) -# arm64: Plain Ubuntu (CPU-only, no CUDA on ARM) +# arm64: Ubuntu 24.04 (CPU-only; Python 3.12 native — no PPA needed) FROM --platform=$BUILDPLATFORM nvidia/cuda:12.9.2-cudnn-runtime-ubuntu22.04 AS base-amd64 -FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS base-arm64 +FROM --platform=$BUILDPLATFORM ubuntu:24.04 AS base-arm64 # ── Build stage ─────────────────────────────────────────────────────────── ARG TARGETARCH @@ -12,13 +12,17 @@ FROM base-${TARGETARCH} AS build ENV DEBIAN_FRONTEND=noninteractive +# amd64 (Ubuntu 22.04 CUDA base): Python 3.12 via deadsnakes PPA +# arm64 (Ubuntu 24.04): Python 3.12 is native — skip PPA entirely RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ - gnupg \ - software-properties-common \ - && add-apt-repository ppa:deadsnakes/ppa -y \ - && apt-get update && apt-get install -y --no-install-recommends \ + && if [ "$TARGETARCH" = "amd64" ]; then \ + apt-get install -y --no-install-recommends gnupg software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa -y \ + && apt-get update; \ + fi \ + && apt-get install -y --no-install-recommends \ python3.12 python3.12-venv python3.12-dev \ libgl1 libglib2.0-0 libxext6 g++ \ && rm -rf /var/lib/apt/lists/* \ @@ -47,10 +51,13 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ - software-properties-common \ tini \ - && add-apt-repository ppa:deadsnakes/ppa -y \ - && apt-get update && apt-get install -y --no-install-recommends \ + && if [ "$TARGETARCH" = "amd64" ]; then \ + apt-get install -y --no-install-recommends gnupg software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa -y \ + && apt-get update; \ + fi \ + && apt-get install -y --no-install-recommends \ python3.12 python3.12-venv \ libgl1 libglib2.0-0 libxext6 \ && rm -rf /var/lib/apt/lists/* \