Spaces:
Sleeping
Sleeping
Download Dockerfile from hirann/cloud-ops-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 865 Bytes
-
https://huggingface.co/spaces/hirann/cloud-ops-optimizer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hirann/cloud-ops-optimizer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hirann/cloud-ops-optimizer/resolve/main/Dockerfile
865 Bytes
| # CloudOps Optimizer Environment Dockerfile | |
| ARG BASE_IMAGE=ghcr.io/meta-pytorch/openenv-base:latest | |
| FROM ${BASE_IMAGE} AS builder | |
| WORKDIR /app | |
| COPY . /app | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| uv sync --no-install-project --no-editable | |
| RUN --mount=type=cache,target=/root/.cache/uv \ | |
| uv sync --no-editable | |
| FROM ${BASE_IMAGE} | |
| WORKDIR /app | |
| COPY --from=builder /app/.venv /app/.venv | |
| COPY --from=builder /app /app | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| ENV PYTHONPATH="/app:$PYTHONPATH" | |
| ENV PORT=7860 | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1 | |
| EXPOSE 7860 | |
| CMD ["python", "main.py"] |