Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim-bookworm | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/.cache/huggingface \ | |
| XDG_CACHE_HOME=/home/user/.cache \ | |
| LLAMA_CACHE=/home/user/.cache/llama.cpp \ | |
| PYTHONUNBUFFERED=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| libgomp1 \ | |
| libcurl4 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| WORKDIR $HOME/app | |
| COPY --chown=user:user requirements.txt $HOME/app/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user:user . $HOME/app | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |