Spaces:
Paused
Paused
Download api/Dockerfile from mrqadeer/email-classifier: direct link, hf CLI and curl.
- Browser
- Download file 573 Bytes
-
https://huggingface.co/spaces/mrqadeer/email-classifier/resolve/main/api/Dockerfile
- Command line
-
hf download hf://spaces/mrqadeer/email-classifier/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mrqadeer/email-classifier/resolve/main/api/Dockerfile
573 Bytes
| FROM python:3.12-slim | |
| WORKDIR /app | |
| # Install uv globally | |
| RUN pip install --no-cache-dir uv | |
| # Copy the entire project directory | |
| # .dockerignore should exclude .venv and other unnecessary files | |
| COPY . . | |
| # Create venv with uv and install dependencies | |
| RUN uv venv /app/.venv && \ | |
| . /app/.venv/bin/activate && \ | |
| uv pip install . && \ | |
| uv sync | |
| # Set environment variable to use the venv | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| # Expose the port the API runs on | |
| EXPOSE 8000 | |
| # Command to run the API | |
| CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"] | |