Download server/Dockerfile from Papajams/liarsdice-openenv: direct link, hf CLI and curl.
- Browser
- Download file 908 Bytes
-
https://huggingface.co/datasets/Papajams/liarsdice-openenv/resolve/main/server/Dockerfile
- Command line
-
hf download hf://datasets/Papajams/liarsdice-openenv/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/datasets/Papajams/liarsdice-openenv/resolve/main/server/Dockerfile
908 Bytes
| FROM python:3.11-slim AS exact-builder | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends g++ \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY evaluation/cpp/liarsdice_exact.cpp /tmp/liarsdice_exact.cpp | |
| RUN c++ -O3 -std=c++17 -shared -fPIC /tmp/liarsdice_exact.cpp -o /tmp/_liarsdice_exact.so | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| COPY . /app/liarsdice_openenv | |
| COPY --from=exact-builder /tmp/_liarsdice_exact.so /app/liarsdice_openenv/evaluation/_liarsdice_exact.so | |
| RUN pip install --no-cache-dir -r /app/liarsdice_openenv/server/requirements.txt | |
| ENV PYTHONPATH=/app:/app/liarsdice_openenv | |
| EXPOSE 8000 | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=2)" || exit 1 | |
| CMD ["sh", "-c", "cd /app/liarsdice_openenv && exec uvicorn server.app:app --host 0.0.0.0 --port 8000"] | |