# Use an official Python runtime as a parent image FROM python:3.11 # Set the working directory in the container WORKDIR /app # Copy the requirements file into the container at /app COPY requirements.txt /app/requirements.txt # Install any dependencies specified in requirements.txt RUN pip install --upgrade pip RUN pip install -r requirements.txt # Copy the rest of the working directory contents into the container at /app COPY app.py /app # Make port 8000 available to the world outside this container EXPOSE 2000 # Health check to ensure the container is running HEALTHCHECK CMD curl --fail http://localhost:2000 || exit 1 # Run uvicorn server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "2000"]