From 04bb3d6f1533ed5d8c992a67e80115441e5e9611 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sat, 23 Nov 2024 18:46:44 -0800 Subject: [PATCH] Fix libmusl error using pre-built llama-cpp-python wheel via Docker Seems like llama-cpp-python pre-built wheels need libmusl. Otherwise you run into runtime errors on Khoj startup via Docker. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06013cb5..b481a8e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ RUN apt update -y && apt -y install \ python3-pip \ swig \ curl \ + # Required by llama-cpp-python pre-built wheels. See #1628 + musl-dev \ # Required by RapidOCR libgl1 \ libglx-mesa0 \ @@ -19,7 +21,9 @@ RUN apt update -y && apt -y install \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ apt update -y && apt -y --no-install-recommends install nodejs yarn && \ - apt clean && rm -rf /var/lib/apt/lists/* + apt clean && rm -rf /var/lib/apt/lists/* && \ + # Required by llama-cpp-python pre-built wheels. See #1628 + ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 # Install Application WORKDIR /app