Spaces:
Sleeping
Sleeping
Download pytest-cache-files-1f62ra1g/container_sim2/server/Dockerfile from uvpatel7271/openenv-python-env: direct link, hf CLI and curl.
- Browser
- Download file 746 Bytes
-
https://huggingface.co/spaces/uvpatel7271/openenv-python-env/resolve/main/pytest-cache-files-1f62ra1g/container_sim2/server/Dockerfile
- Command line
-
hf download hf://spaces/uvpatel7271/openenv-python-env/pytest-cache-files-1f62ra1g/container_sim2/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/uvpatel7271/openenv-python-env/resolve/main/pytest-cache-files-1f62ra1g/container_sim2/server/Dockerfile
746 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY requirements.txt /app/server/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/server/requirements.txt | |
| # Copy the self-contained server package | |
| COPY . /app/server | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=8000 | |
| ENV WORKERS=1 | |
| ENV MAX_CONCURRENT_ENVS=16 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ | |
| CMD curl -f http://localhost:${PORT}/health || exit 1 | |
| # Run FastAPI app | |
| EXPOSE ${PORT} | |
| CMD ["python", "-m", "server.app"] | |