From 498895a47d71bd26eedacd47f45b9e5102380d2f Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sat, 23 Nov 2024 20:47:41 -0800 Subject: [PATCH] Fix libmusl error using pre-built llama-cpp-python wheel in prod Docker --- prod.Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prod.Dockerfile b/prod.Dockerfile index c0d7c754..4a8f5fac 100644 --- a/prod.Dockerfile +++ b/prod.Dockerfile @@ -14,12 +14,16 @@ RUN apt update -y && apt -y install \ libxext6 \ swig \ curl && \ + # Required by llama-cpp-python pre-built wheels. See #1628 + musl-dev \ # Required by Next.js Web app curl -sL https://deb.nodesource.com/setup_20.x | bash - && \ 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 @@ -38,7 +42,7 @@ ENV PYTHONPATH=/app/src:$PYTHONPATH # Go to the directory src/interface/web and export the built Next.js assets WORKDIR /app/src/interface/web -RUN bash -c "yarn install --frozen-lockfile --verbose && yarn ciexport && yarn cache clean" +RUN bash -c "yarn install --frozen-lockfile && yarn ciexport && yarn cache clean" WORKDIR /app # Run the Application