Spaces:
Running on T4
Running on T4
Download Dockerfile.sam from modventures/baseball-engine: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/Dockerfile.sam
- Command line
-
hf download hf://spaces/modventures/baseball-engine/Dockerfile.sam
-
curl -L -o Dockerfile.sam https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/Dockerfile.sam
1.12 kB
| # Build the ordinary image first; this adds an isolated SAM runtime. | |
| # SAM weights are mounted at runtime, never embedded using a build-time token. | |
| ARG BASE_IMAGE=baseball-engine-api:local | |
| FROM ${BASE_IMAGE} | |
| USER root | |
| RUN apt-get update && apt-get install -y --no-install-recommends git build-essential libgl1 libegl1 libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements-sam.txt ./ | |
| RUN python -m venv /opt/sam-runtime \ | |
| && /opt/sam-runtime/bin/python -m pip install torch==2.9.1 torchvision==0.24.1 --index-url https://download.pytorch.org/whl/cu128 \ | |
| && /opt/sam-runtime/bin/python -m pip install -r requirements-core.txt -r requirements-sam.txt \ | |
| && /opt/sam-runtime/bin/python -m pip install git+https://github.com/facebookresearch/detectron2.git@a1ce2f9 --no-build-isolation --no-deps \ | |
| && git clone https://github.com/facebookresearch/sam-3d-body.git /opt/sam-source \ | |
| && git -C /opt/sam-source checkout b5c765a0d89d789985e186d396315e7590887b94 \ | |
| && chown -R baseball:baseball /opt/sam-source | |
| ENV BASEBALL_SAM_WORKER_RECORD=/opt/sam-assets/sam-api-worker.json | |
| USER baseball | |