| # 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"] | |