FROM python:3.9 # Set the working directory WORKDIR /code # Copy files into the container COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # Expose port used by FastAPI EXPOSE 7860 # Run the FastAPI app with uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]