# Use an official Python base image FROM python:3.9-slim-buster # Set the working directory inside the container WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy your application code into the container COPY . . # Expose the port Gunicorn will listen on EXPOSE 8000 # Command to run Gunicorn, assuming your application is named 'main.py' and contains a WSGI callable 'app' # Adjust 'main:app' to match your application's module and WSGI callable name CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "4"]