Spaces:
Runtime error
Runtime error
File size: 671 Bytes
ec4fe29 9129286 ec4fe29 01fb2b2 ec4fe29 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.9
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Use the recommended HF_HOME instead of deprecated TRANSFORMERS_CACHE
ENV HF_HOME=/code/cache/huggingface
# Create the directory for the Transformers cache and set permissions
RUN mkdir -p /code/cache/huggingface && chmod -R 777 /code/cache/huggingface
COPY . /app
EXPOSE 7860
# Increase Gunicorn timeout to prevent worker timeout during long initializations
CMD ["gunicorn", "-b", "0.0.0.0:7862", "main:app", "--timeout", "120",]
# CMD ["gunicorn", "-b", "0.0.0.0:7862", "main:app", "--timeout", "120", "--workers", "2", "--threads", "2"]
|