Spaces:
Running
Running
File size: 509 Bytes
9efb5b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Use the official Python image as a base
FROM python:3.8
# Set the working directory
WORKDIR /app
# Install the required packages
RUN pip install fastapi uvicorn requests python-multipart
# Copy the FastAPI application code into the container
COPY . .
# Expose the required port for FastAPI (you may choose any available port, e.g., 7860 for compatibility with Hugging Face Spaces)
EXPOSE 7860
# Run the FastAPI application with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |