FROM python:3.12.7-slim-bookworm WORKDIR /poc RUN pip install --no-cache-dir \ torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu RUN pip install --no-cache-dir "transformers==5.3.0" safetensors tokenizers COPY sglang_source/python /sglang_source/python RUN echo '# Neutered for PoC' > /sglang_source/python/sglang/__init__.py RUN cd /sglang_source/python && pip install --no-cache-dir --no-deps -e . RUN pip install --no-cache-dir \ IPython pybase64 requests aiohttp filelock numpy packaging \ pydantic msgspec psutil compressed-tensors sentencepiece \ tiktoken einops pillow protobuf scipy triton \ interegular orjson partial-json-parser gguf \ mistral-common outlines starlette uvicorn fastapi \ uvloop setproctitle watchfiles python-multipart \ prometheus-client pyzmq tqdm datasets blobfile \ "openai==2.6.1" openai-harmony httpx \ 2>/dev/null; true RUN pip install --no-cache-dir --force-reinstall "transformers==5.3.0" RUN pip install --no-cache-dir torchcodec 2>/dev/null || \ pip install --no-cache-dir "torchcodec==0.9.1" 2>/dev/null || \ pip install --no-cache-dir "torchcodec>=0.1" 2>/dev/null || true COPY pinned_versions.json . COPY verify_import.py . RUN python3 verify_import.py || echo "import smoke test failed; will retry under stubs at runtime" COPY setup_model.py . COPY run_poc.py . COPY test_server.py . COPY test_versions.py . COPY entrypoint.sh . RUN chmod +x entrypoint.sh ENTRYPOINT ["./entrypoint.sh"]