From 62ed55e2acadad29eb728084a27c7ffe97077589 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 25 Mar 2024 15:39:26 +0000 Subject: [PATCH] Move llama-cpp dependencies install to intermediary dependencies layer --- Dockerfile.local | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile.local b/Dockerfile.local index c41974c4..d4ba8bec 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -7,7 +7,11 @@ RUN pip install pipx RUN pipx install poetry ENV PATH="/root/.local/bin:$PATH" ENV PATH=".venv/bin/:$PATH" +# https://python-poetry.org/docs/configuration/#virtualenvsin-project +ENV POETRY_VIRTUALENVS_IN_PROJECT=true +FROM base as dependencies +WORKDIR /home/worker/app # Dependencies to build llama-cpp RUN apt update && apt install -y \ libopenblas-dev\ @@ -15,14 +19,7 @@ RUN apt update && apt install -y \ build-essential\ pkg-config\ wget - -# https://python-poetry.org/docs/configuration/#virtualenvsin-project -ENV POETRY_VIRTUALENVS_IN_PROJECT=true - -FROM base as dependencies -WORKDIR /home/worker/app COPY pyproject.toml poetry.lock ./ - ARG POETRY_EXTRAS="ui embeddings-huggingface llms-llama-cpp vector-stores-qdrant" RUN poetry install --no-root --extras "${POETRY_EXTRAS}"