|
FROM python:3.10.14 |
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive |
|
ENV TZ=Europe/Paris |
|
RUN apt-get update && apt-get install -y \ |
|
git \ |
|
jq \ |
|
make build-essential libssl-dev zlib1g-dev \ |
|
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ |
|
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
USER user |
|
ENV HOME /home/user |
|
ENV PATH $HOME/.local/bin:$PATH |
|
WORKDIR $HOME |
|
RUN mkdir app |
|
WORKDIR $HOME/app |
|
|
|
|
|
|
|
RUN git clone https://github.com/ggerganov/llama.cpp.git |
|
WORKDIR $HOME/app/llama.cpp |
|
RUN make quantize |
|
WORKDIR $HOME/app |
|
|
|
|
|
|
|
COPY --chown=user ./ $HOME/app |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMD ["python", "app.py"] |
|
|