spam-detection-app / Dockerfile
premmm's picture
Upload folder using huggingface_hub
9930208 verified
Raw
History Blame Contribute Delete
467 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uv/bin/
ENV PATH="/uv/bin:$PATH"
# Copy project files
COPY . .
# Install python dependencies
RUN uv sync --frozen
# Expose the port HF Spaces uses
EXPOSE 7860
# Run the application
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]