FROM --platform=linux/amd64 ic-registry.epfl.ch/cvlab/sj/cuda12-4@sha256:d29902d885459b872bcd3b8269276c4c134a1e4227701e681abadfcb89c00bac ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PYTHONNOUSERSITE=1 \ HF_HUB_OFFLINE=1 \ TRANSFORMERS_OFFLINE=1 \ TOKENIZERS_PARALLELISM=false \ WANDB_MODE=disabled \ PROCEDURE_RUNTIME_ROOT=/opt/procedure \ PROCEDURE_PYTHON=/opt/procedure/venv/bin/python \ PROCEDURE_MODEL_ROOT=/opt/procedure/model \ PROCEDURE_MODEL_MANIFEST=/opt/procedure/model.manifest.tsv WORKDIR /opt/procedure COPY requirements.direct.txt requirements.lock.txt /opt/procedure/ RUN python3 -m venv --system-site-packages /opt/procedure/venv \ && /opt/procedure/venv/bin/python -m pip install --no-cache-dir \ --extra-index-url https://download.pytorch.org/whl/cu130 \ --requirement /opt/procedure/requirements.lock.txt \ && /opt/procedure/venv/bin/python -m pip install --no-cache-dir \ --force-reinstall --no-deps opencv-python-headless==5.0.0.93 COPY bundle/ /opt/procedure/bundle/ COPY model.manifest.tsv /opt/procedure/model.manifest.tsv COPY model/ /opt/procedure/model/ COPY entrypoint.sh /opt/procedure/entrypoint.sh RUN chmod 0755 /opt/procedure/entrypoint.sh \ && find /opt/procedure/model -type d -exec chmod 0755 {} + \ && find /opt/procedure/model -type f -exec chmod 0444 {} + \ && /opt/procedure/venv/bin/python -m bundle.verify_model \ --model-root /opt/procedure/model \ --manifest /opt/procedure/model.manifest.tsv >/dev/null \ && /opt/procedure/venv/bin/python -m bundle.verify_runtime >/dev/null \ && /opt/procedure/venv/bin/python -m pip check \ && groupadd --gid 10001 runner \ && useradd --create-home --uid 10001 --gid 10001 runner \ && chown -R 10001:10001 /opt/procedure/venv /home/runner ENV HOME=/home/runner \ TMPDIR=/tmp \ VLLM_RPC_BASE_PATH=/tmp USER 10001:10001 ENTRYPOINT ["/opt/procedure/entrypoint.sh"]