Download env/server/Dockerfile from cmpatino/crossdomain-env: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/datasets/cmpatino/crossdomain-env/resolve/main/env/server/Dockerfile
- Command line
-
hf download hf://datasets/cmpatino/crossdomain-env/env/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/datasets/cmpatino/crossdomain-env/resolve/main/env/server/Dockerfile
1.24 kB
| # SPDX-License-Identifier: BSD-3-Clause | |
| FROM python:3.12-slim | |
| LABEL org.opencontainers.image.title="crossdomain-env" \ | |
| org.opencontainers.image.description="OpenEnv environment: verifiable problems from eight professional domains with a Python scratchpad" \ | |
| org.opencontainers.image.source="https://huggingface.co/datasets/cmpatino/crossdomain-env" \ | |
| org.opencontainers.image.licenses="BSD-3-Clause" | |
| RUN apt-get update && apt-get install -y --no-install-recommends git curl && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app/env | |
| COPY pyproject.toml ./ | |
| RUN pip install --no-cache-dir \ | |
| "openenv @ git+https://github.com/meta-pytorch/OpenEnv.git@86a180ede21e044f7929b9a7783ad83aa67d83a3" \ | |
| "numpy>=1.26" "sympy>=1.12" "uvicorn>=0.24" \ | |
| && apt-get purge -y git && apt-get autoremove -y | |
| COPY . /app/env | |
| # Server code and the answer key live in a root-owned process; the Python tool | |
| # drops to uid 65534 before running model code. | |
| RUN chmod -R go-w /app/env | |
| ENV PYTHONPATH=/app/env PYTHONUNBUFFERED=1 | |
| EXPOSE 8000 | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:8000/health || exit 1 | |
| CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"] | |