Spaces:
Sleeping
Sleeping
File size: 645 Bytes
dbdeb41 cc4c1a2 d8f4af4 cc4c1a2 d8f4af4 75223e2 cc4c1a2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | FROM python:3.10-slim-bullseye
# set working directory
WORKDIR /app
# copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# copy all app files
COPY . .
# --- create a writable cache directory ---
RUN mkdir -p /app/cache/huggingface && chmod -R 777 /app/cache
# --- set all relevant cache environment variables ---
ENV HF_HOME=/app/cache/huggingface
ENV TRANSFORMERS_CACHE=/app/cache/huggingface
ENV SENTENCE_TRANSFORMERS_HOME=/app/cache/huggingface
ENV HF_DATASETS_CACHE=/app/cache/huggingface
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|