# Official Python image FROM python:3.12-slim # Set workdir WORKDIR /app # Copy the file with the requirements COPY requirements.txt . # Install the package dependencies in the requirements file. RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy the FastAPI app folder in the container COPY . . # Expose API port EXPOSE 80 # Runs the stub script & launches the uvicorn server (command from offical FastAPI documentation) CMD ["sh", "-c", "python3 app/stub.py && fastapi run app/main.py --port 80"]