FROM python:3.11-slim # kubectl — the kubernetes launch backend (agent_swarm#16/#56) shells out to `kubectl apply/delete` # to create/teardown agent Pods + per-swarm key Secrets. Without it the k8s backend fails (0 agents). # Pinned to the cluster minor (AKS 1.34) per kubectl skew policy. (linux/amd64 — AKS default node arch.) RUN apt-get update \ && apt-get install -y --no-install-recommends curl ca-certificates git \ && KUBECTL_VERSION="$(curl -fsSL https://dl.k8s.io/release/stable-1.34.txt)" \ && curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \ && kubectl version --client=true 2>/dev/null \ && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install dependencies COPY orchestrator/requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy orchestrator code COPY orchestrator/ ./orchestrator/ # orchestrator/quality.py imports benchmark.fixtures / benchmark.metrics at startup, # so the package must be present in the image (agent_swarm#44). stdlib-only — no extra pip. COPY benchmark/ ./benchmark/ # Expose port EXPOSE 8000 # Run orchestrator CMD ["python", "-m", "uvicorn", "orchestrator.main:app", "--host", "0.0.0.0", "--port", "8000"]