Spaces:
Running
Running
Download Dockerfile from imaan3/optorigbench-tools: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/spaces/imaan3/optorigbench-tools/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/imaan3/optorigbench-tools/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/imaan3/optorigbench-tools/resolve/main/Dockerfile
1.45 kB
| # OptoRigBench tools: a launcher and its web pages. At start the launcher downloads the simulator's code from the | |
| # private repository named by the CODE_REPO secret, using the CODE_TOKEN secret, and installs it with uv (see | |
| # app/main.py); until both secrets are set the pages show a "Not configured yet" notice. | |
| FROM python:3.13-slim-trixie | |
| # ffmpeg (encodes the replay movies), libllvm19 (Dr.Jit's LLVM backend for the room-camera renderer used in replay | |
| # movies), git and patch (general tools; the launcher calls neither). uv comes from requirements.txt below. | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends git ffmpeg patch libllvm19 \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && ln -s "$(find /usr/lib -name 'libLLVM.so.19*' -print -quit)" /usr/local/lib/libLLVM.so | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| RUN useradd --create-home --uid 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| DRJIT_LIBLLVM_PATH=/usr/local/lib/libLLVM.so \ | |
| UV_PYTHON=/usr/local/bin/python3 \ | |
| UV_PYTHON_DOWNLOADS=never \ | |
| UV_CACHE_DIR=/home/user/.cache/uv \ | |
| DATA_DIR=/home/user/data \ | |
| HF_HUB_DISABLE_PROGRESS_BARS=1 | |
| WORKDIR /home/user/app | |
| COPY --chown=user app/ /home/user/app/ | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--timeout-keep-alive", "30"] | |