File size: 654 Bytes
5039004 9a6571c afe2a94 9a6571c 5039004 97d211e 0fb3706 5039004 afe2a94 5039004 9ef242b 0fb3706 8825fec 6087fee 94023cd | 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 26 27 28 29 | FROM python:3.10-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
libopenblas0 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
HF_HOME=/home/user/cache
WORKDIR /app
RUN pip install --no-cache-dir --upgrade pip
COPY --chown=user build /app/build
RUN pip install --force-reinstall /app/build/llama_cpp_python-*.whl
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . .
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|