From 15ae22bdcfbfde19e99e29611d9ecfc11c9ff258 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sat, 23 Nov 2024 14:33:43 -0800 Subject: [PATCH] Use pre-built llama-cpp-python wheel in Khoj docker images Reduces build time and resolves FileNotFoundError 'ninja' during llama-cpp-python local build. --- Dockerfile | 1 + prod.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 479fbadc..06013cb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,7 @@ WORKDIR /app COPY pyproject.toml . COPY README.md . ARG VERSION=0.0.0 +ENV PIP_EXTRA_INDEX_URL=https://abetlen.github.io/llama-cpp-python/whl/cpu RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.toml && \ pip install --no-cache-dir . diff --git a/prod.Dockerfile b/prod.Dockerfile index d955f155..c0d7c754 100644 --- a/prod.Dockerfile +++ b/prod.Dockerfile @@ -26,6 +26,7 @@ WORKDIR /app COPY pyproject.toml . COPY README.md . ARG VERSION=0.0.0 +ENV PIP_EXTRA_INDEX_URL=https://abetlen.github.io/llama-cpp-python/whl/cpu RUN sed -i "s/dynamic = \\[\"version\"\\]/version = \"$VERSION\"/" pyproject.toml && \ pip install --no-cache-dir -e .[prod]