lvvignesh2122's picture
Configure for Hugging Face Spaces: Port 7860 and SDK: Docker
4b7bc58
raw
history blame contribute delete
480 Bytes
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
# Expose port (Must be 7860 for Hugging Face Spaces)
EXPOSE 7860
# Run with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]