Download Dockerfile from shxam/openenv: direct link, hf CLI and curl.
- Browser
- Download file 693 Bytes
-
https://huggingface.co/spaces/shxam/openenv/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/shxam/openenv/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/shxam/openenv/resolve/main/Dockerfile
693 Bytes
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY gst_env/ ./gst_env/ | |
| COPY server/ ./server/ | |
| COPY inference.py . | |
| COPY openenv.yaml . | |
| # Create non-root user | |
| RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| CMD ["python", "-c", "from server.app import main; main()"] |