Spaces:
Sleeping
Sleeping
Download server/Dockerfile from renanserrano/simulationlab-hr: direct link, hf CLI and curl.
- Browser
- Download file 903 Bytes
-
https://huggingface.co/spaces/renanserrano/simulationlab-hr/resolve/main/server/Dockerfile
- Command line
-
hf download hf://spaces/renanserrano/simulationlab-hr/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/renanserrano/simulationlab-hr/resolve/main/server/Dockerfile
903 Bytes
| ARG BASE_IMAGE=openenv-base:latest | |
| FROM ${BASE_IMAGE} AS builder | |
| WORKDIR /app | |
| COPY . /app/env | |
| WORKDIR /app/env | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| if [ -f uv.lock ]; then \ | |
| uv sync --frozen --no-install-project --no-editable; \ | |
| else \ | |
| uv sync --no-install-project --no-editable; \ | |
| fi | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| if [ -f uv.lock ]; then \ | |
| uv sync --frozen --no-editable; \ | |
| else \ | |
| uv sync --no-editable; \ | |
| fi | |
| FROM ${BASE_IMAGE} | |
| WORKDIR /app | |
| COPY --from=builder /app/env/.venv /app/.venv | |
| COPY --from=builder /app/env /app/env | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| ENV PYTHONPATH="/app/env:$PYTHONPATH" | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:8000/health || exit 1 | |
| CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port 8000"] | |