Spaces:
Sleeping
Sleeping
Download Dockerfile from aakashdandekar2006/sql-debug-env: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/spaces/aakashdandekar2006/sql-debug-env/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aakashdandekar2006/sql-debug-env/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aakashdandekar2006/sql-debug-env/resolve/main/Dockerfile
682 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Hugging Face Spaces require a non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Install dependencies first (layer cache) | |
| COPY --chown=user server/requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY --chown=user . . | |
| # Optional: enable the built-in web debug interface | |
| # Set to "true" to activate /web route | |
| ENV ENABLE_WEB_INTERFACE=false | |
| # HF Spaces maps external port 7860 → internal 7860; | |
| # local Docker runs typically use 8000. | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |