From 42048f6bb96babba0d18348d9f7072807eedc551 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 25 Mar 2024 11:07:04 +0000 Subject: [PATCH] `POETRY_EXTRAS` build argument with default values --- Dockerfile.external | 3 ++- Dockerfile.local | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.external b/Dockerfile.external index f3afac45..8767654f 100644 --- a/Dockerfile.external +++ b/Dockerfile.external @@ -14,7 +14,8 @@ FROM base as dependencies WORKDIR /home/worker/app COPY pyproject.toml poetry.lock ./ -RUN poetry install --extras "ui vector-stores-qdrant llms-ollama embeddings-ollama" +ARG POETRY_EXTRAS="ui vector-stores-qdrant llms-ollama embeddings-ollama" +RUN poetry install --extras "${POETRY_EXTRAS}" FROM base as app diff --git a/Dockerfile.local b/Dockerfile.local index 8c5c0737..49e8d412 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -24,7 +24,8 @@ FROM base as dependencies WORKDIR /home/worker/app COPY pyproject.toml poetry.lock ./ -RUN poetry install --extras "ui embeddings-huggingface llms-llama-cpp vector-stores-qdrant" +ARG POETRY_EXTRAS="ui embeddings-huggingface llms-llama-cpp vector-stores-qdrant" +RUN poetry install --extras "${POETRY_EXTRAS}" FROM base as app