# Base image: torch 2.8.0+cu128 still lists sm_70 in torch.cuda.get_arch_list(). # The CUDA 13 builds of torch drop sm_70. worker-1 holds Tesla V100 cards with # compute capability 7.0, so a newer base kills the kernel launch at load time. # Keep this pin until the model moves to newer hardware. FROM pytorch/pytorch:2.8.0-cuda12.8-cudnn9-runtime # Unbuffered output lets the pod log show the startup lines in order. ENV PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 WORKDIR /app # torch comes from the base image. Never reinstall it here, or pip pulls a # wheel built for another CUDA version. COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . EXPOSE 8080 CMD ["uvicorn", "app:create_app", "--factory", "--host", "0.0.0.0", "--port", "8080"]