From 4de7f55f2fb9b135c1f68c11a481622653c5466c Mon Sep 17 00:00:00 2001 From: mudler Date: Fri, 7 Jul 2023 00:29:10 +0200 Subject: [PATCH] Make REBUILD=false default behavior Add notice to documentation Signed-off-by: mudler --- .env | 4 ++-- Dockerfile | 2 +- entrypoint.sh | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 040bba3..890ff94 100644 --- a/.env +++ b/.env @@ -26,8 +26,8 @@ MODELS_PATH=/models ## Specify a build type. Available: cublas, openblas, clblas. # BUILD_TYPE=openblas -## Uncomment and set to false to disable rebuilding from source -# REBUILD=false +## Uncomment and set to true to enable rebuilding from source +# REBUILD=true ## Enable go tags, available: stablediffusion, tts ## stablediffusion: image generation with stablediffusion diff --git a/Dockerfile b/Dockerfile index 1c0685a..c22f5dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,7 +94,7 @@ FROM requirements ARG FFMPEG -ENV REBUILD=true +ENV REBUILD=false ENV HEALTHCHECK_ENDPOINT=http://localhost:8080/readyz # Add FFmpeg diff --git a/entrypoint.sh b/entrypoint.sh index 2bd8d02..b787649 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,16 @@ cd /build if [ "$REBUILD" != "false" ]; then rm -rf ./local-ai ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build -j${BUILD_PARALLELISM:-1} +else + echo "@@@@@" + echo "Skipping rebuild" + echo "@@@@@" + echo "If you are experiencing issues with the pre-compiled builds, try setting REBUILD=true" + echo "If you are still experiencing issues with the build, try setting CMAKE_ARGS and disable the instructions set as needed:" + echo 'CMAKE_ARGS="-DLLAMA_F16C=OFF -DLLAMA_AVX512=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF"' + echo "see the documentation at: https://localai.io/basics/build/index.html" + echo "Note: See also https://github.com/go-skynet/LocalAI/issues/288" + echo "@@@@@" fi ./local-ai "$@"