# Use an official Python runtime as a parent image FROM python:3.9-slim-buster # Set the working directory in the container to /app WORKDIR /app # Copy the requirements file to the container at /app COPY requirements.txt /app # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Set both TRANSFORMERS_CACHE and HF_HOME ENV TRANSFORMERS_CACHE=/tmp ENV HF_HOME=/tmp # Copy the application code to the container at /app COPY . /app # Make port 8080 available to the world outside this container EXPOSE 8080 # Run app.py when the container launches CMD ["python", "app.py"]