FROM python:3.9 # Install some assorted build and dev libraries ARG DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris RUN apt-get update && apt-get install -y \ vim \ 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 # User 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 # App and Python reqs COPY --chown=user ./ $HOME/app RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r llama.cpp/requirements.txt ENV PYTHONPATH $HOME/app ENV PYTHONUNBUFFERED 1 ENV GRADIO_ALLOW_FLAGGING never ENV GRADIO_NUM_PORTS 1 ENV GRADIO_SERVER_NAME 0.0.0.0 ENV GRADIO_THEME huggingface ENV SYSTEM spaces ENV HF_HUB_ENABLE_HF_TRANSFER 1 ENTRYPOINT /bin/sh start.sh