File size: 330 Bytes
7a3c841 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy files to the container
COPY main.py /app/main.py
# Install FastAPI and Uvicorn
RUN pip install fastapi uvicorn
# Expose port 7860
EXPOSE 7860
# Command to run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|