File size: 348 Bytes
95b889b 5d174e7 95b889b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | FROM python:3.9-slim
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose port 7860 (Hugging Face Spaces default)
ENV PORT=7860
EXPOSE 7860
# Command to run the FastAPI app
CMD uvicorn api:app --host 0.0.0.0 --port ${PORT}
|