FROM python:3.9-slim WORKDIR /code # Create cache directory with proper permissions ENV TRANSFORMERS_CACHE=/code/.cache/huggingface RUN mkdir -p /code/.cache/huggingface && chmod 777 /code/.cache/huggingface COPY ./requirements.txt /code/requirements.txt COPY . /code RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt EXPOSE 7860 CMD ["python", "app.py"]