FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime # Saw chamber serverless worker: deps baked so cold start = model load only. # No registry secrets, no code baked in — worker.py + server.py are copied # here, but they can also be refreshed from the public tarball at run time. RUN apt-get update -qq && apt-get install -y -qq wget && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir "numpy<2" "transformers==4.51.3" accelerate runpod && \ pip install --no-cache-dir "torch==2.4.0" --index-url https://download.pytorch.org/whl/cu121 && \ python -c "import torch, transformers; print(f' baked {torch.__version__} {transformers.__version__}')" COPY worker.py /app/live/worker.py COPY server.py /app/live/server.py COPY jlens_l18_qwen3-4b.pt /app/live/jlens_l18_qwen3-4b.pt ENV CHAMBER_DEVICE=cuda \ CHAMBER_DTYPE=float16 \ CHAMBER_LAYER=18 \ HF_HOME=/workspace/hf WORKDIR /app/live CMD ["python", "-u", "worker.py"]