Spaces:
Sleeping
Sleeping
File size: 419 Bytes
43457a6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | FROM python:3.11-slim
# Set the working directory to /app
WORKDIR /app
# Copy the requirements and install them
COPY api_requirements.txt .
RUN pip install --no-cache-dir -r api_requirements.txt
# Copy the API app file
COPY api_app.py .
# Expose port 7860 which Hugging Face Spaces requires
EXPOSE 7860
# Start the FastAPI server using Uvicorn
CMD ["uvicorn", "api_app:app", "--host", "0.0.0.0", "--port", "7860"]
|