# Use the official Python 3.9 image FROM python:3.9 # Set the working directory inside the container WORKDIR /code # Copy the requirements file into the container COPY requirements.txt . # Install the required packages RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy the application code into the container COPY ./ /code/ # Expose the port the app will run on EXPOSE 7860 # Command to run the application CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]