Spaces:
Running
Running
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
# you will also find guides on how best to write your Dockerfile | |
FROM python:3.11.6 | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
# Create a directory for the cache and set the correct permissions | |
RUN mkdir -p /usr/src/app/cache && chmod 777 /usr/src/app/cache | |
# Set the TRANSFORMERS_CACHE environment variable | |
ENV TRANSFORMERS_CACHE=/usr/src/app/cache | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
COPY . . | |
# Corrected CMD instruction | |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"] | |