Spaces:
Sleeping
Sleeping
File size: 560 Bytes
e3af086 7d74338 cea5896 e3af086 7d74338 cea5896 e3af086 cea5896 e3af086 cea5896 e3af086 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
# Create and open permissions on /data for the runtime user
RUN mkdir -p /data/hf_cache && chmod -R 777 /data
# Cache envs for hf_hub / ctransformers
ENV HF_HOME=/data/hf_cache
ENV HUGGINGFACE_HUB_CACHE=/data/hf_cache
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py /app/app.py
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|