FROM python:3.10 WORKDIR /code # Copy requirements and install dependencies COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Set up the cache directory for Hugging Face models ENV TRANSFORMERS_CACHE=/code/.cache RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache # Copy the application files COPY . . # Start the Flask app with Gunicorn CMD ["gunicorn", "-b", "0.0.0.0:7860", "app"]