Spaces:
Sleeping
Sleeping
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"] | |