# Use an official lightweight Python image. FROM python:3.9-slim # Set a working directory. WORKDIR /app # Copy requirements file and install Python dependencies. COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt # Copy the rest of the application code. COPY . . # Expose the port the app runs on. EXPOSE 7860 # Set the command to run the app using uvicorn. CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]