# Base image for Python and dependencies | |
FROM python:3.9-slim | |
# Set environment variables for Hugging Face token | |
ENV HUGGINGFACE_TOKEN=$HUGGINGFACE_TOKEN | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Copy requirements.txt to the working directory | |
COPY requirements.txt . | |
# Install required Python packages | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the entire project to the working directory | |
COPY . . | |
# Expose the port Flask will run on | |
EXPOSE 5000 | |
# Command to run the Flask app | |
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"] | |