Spaces:
Sleeping
Sleeping
Download Dockerfile from Eishaan/sql-migration-env: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/spaces/Eishaan/sql-migration-env/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Eishaan/sql-migration-env/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Eishaan/sql-migration-env/resolve/main/Dockerfile
718 Bytes
| FROM python:3.11-slim-bookworm | |
| WORKDIR /app | |
| # Copy and install dependencies first (cache layer optimization) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all project files | |
| COPY . . | |
| # Set environment variables for docker and huggingface | |
| ENV PYTHONPATH="/app:$PYTHONPATH" | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| ENV OPENENV_WEB_INTERFACE=true | |
| # Health check | |
| 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 | |
| # HF Spaces requires port 7860 | |
| EXPOSE 7860 | |
| # Run the FastAPI server | |
| CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |