Download Dockerfile from acpcchatbotadmin/acpcchatbot_testing_first: direct link, hf CLI and curl.
- Browser
- Download file 663 Bytes
-
https://huggingface.co/spaces/acpcchatbotadmin/acpcchatbot_testing_first/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/acpcchatbotadmin/acpcchatbot_testing_first/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/acpcchatbotadmin/acpcchatbot_testing_first/resolve/main/Dockerfile
663 Bytes
| # Stage 1: Build dependencies | |
| FROM python:3.11-slim AS builder | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| # Install system-wide, not --user | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Stage 2: Runtime | |
| FROM python:3.11-slim AS runtime | |
| WORKDIR /app | |
| # Copy system-wide site-packages from builder | |
| COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages | |
| COPY --from=builder /usr/local/bin /usr/local/bin | |
| # Copy application code | |
| COPY app/ ./app/ | |
| # HF Spaces runs as UID 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |