# Use a lightweight Python version FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Copy the requirements file first to cache dependencies COPY requirements.txt . # Install Python libraries RUN pip install --no-cache-dir -r requirements.txt # Copy the application code and artifacts folder COPY . . # Expose the port required by Hugging Face EXPOSE 7860 # Command to start the server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]