# Use a slim Python base image FROM python:3.11-slim # Install build tools just in case a package needs to compile from source RUN apt-get update && apt-get install -y build-essential # Set the working directory WORKDIR /code # Copy the requirements file and install dependencies COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy the application code COPY ./app /code/app # Command to run the Uvicorn server CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]