Spaces:
Running
Running
# Base image | |
FROM python:3.11-slim | |
# Set environment variables | |
ENV PYTHONDONTWRITEBYTECODE=1 | |
ENV PYTHONUNBUFFERED=1 | |
# Set work directory | |
WORKDIR /app | |
# Copy project files | |
COPY . . | |
# Install dependencies | |
RUN pip install --upgrade pip && \ | |
pip install -r requirements.txt | |
# Expose default port for HF Spaces (7860 or 8000) | |
EXPOSE 7860 | |
# Start FastAPI using uvicorn | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |