LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

api failed to build: failed to solve: process "/bin/sh -c ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build" did not complete successfully: exit code: 2

Open Agility0493 opened this issue 2 years ago • 6 comments

LocalAI version: Using docker-compose with the latest LocalAI image tag. Looks like its on v1.24.1

Environment, CPU architecture, OS, and Version: VPS, Ubuntu 22.04.1 LTS, 2 CPUs, size: 8 units, disk space: 80GB, RAM: 4096MB.

Linux 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Trying to use the default defined gpt4all model in the yml file as its documentation says it can run on 4-8 GB of ram: https://docs.gpt4all.io/

Describe the bug

After following the steps on: https://github.com/go-skynet/LocalAI/tree/master/examples/chatbot-ui

and using a clean docker install the app won't finish building when it encounters the ESPEAK_DATA part.

To Reproduce Using the chatbot-ui example from the localai repo.

Steps outlined here: https://github.com/go-skynet/LocalAI/tree/master/examples/chatbot-ui

Expected behavior Using the cloned localai repo and expect it to build as I've not changed anything to the files.

Logs => ERROR [builder 8/8] RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/pip 68.1s

[builder 8/8] RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build: 0.690 go mod edit -replace github.com/go-skynet/go-llama.cpp=/build/go-llama 0.896 go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/build/gpt4all/gpt4all-bindings/golang 0.905 go mod edit -replace github.com/go-skynet/go-ggml-transformers.cpp=/build/go-ggml-transformers 0.912 go mod edit -replace github.com/donomii/go-rwkv.cpp=/build/go-rwkv 0.920 go mod edit -replace github.com/ggerganov/whisper.cpp=/build/whisper.cpp 0.929 go mod edit -replace github.com/go-skynet/go-bert.cpp=/build/go-bert 0.944 go mod edit -replace github.com/go-skynet/bloomz.cpp=/build/bloomz 0.958 go mod edit -replace github.com/mudler/go-stable-diffusion=/build/go-stable-diffusion 0.972 go mod edit -replace github.com/mudler/go-piper=/build/go-piper 0.986 go mod edit -replace github.com/mudler/go-ggllm.cpp=/build/go-ggllm 0.995 go mod download 1.304 touch prepare 1.308 mkdir -p backend-assets/grpc 1.414 go build -ldflags "-X "github.com/go-skynet/LocalAI/internal.Version=v1.24.1-12-gddf9bc2" -X "github.com/go-skynet/LocalAI/internal.Commit=ddf9bc2335983c1b052096bcd5b5f2521b80835d"" -tags "stablediffusion tts" -o backend-assets/grpc/langchain-huggingface ./cmd/grpc/langchain-huggingface/ 50.03 make -C go-ggml-transformers BUILD_TYPE= libtransformers.a 50.03 make[1]: Entering directory '/build/go-ggml-transformers' 50.05 I libtransformers build info: 50.05 I UNAME_S: Linux 50.05 I UNAME_P: unknown 50.05 I UNAME_M: x86_64 50.05 I CFLAGS: -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -I -O3 -DNDEBUG -std=c11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -Wno-unused-function -pthread -march=native -mtune=native 50.05 I CXXFLAGS: -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native 50.05 I LDFLAGS:
50.05 I CMAKE_ARGS:
50.05 I CC: cc (Debian 10.2.1-6) 10.2.1 20210110 50.05 I CXX: g++ (Debian 10.2.1-6) 10.2.1 20210110 50.05 50.12 g++ -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native starcoder.cpp -o starcoder.o -c 51.69 In file included from starcoder.cpp:19: 51.69 ggml.cpp/examples/starcoder/main.cpp: In function 'int main_starcoder(int, char**)': 51.69 ggml.cpp/examples/starcoder/main.cpp:799:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.69 799 | for (int i = 0; i < embd_inp.size(); i++) { 51.69 | ~~^~~~~~~~~~~~~~~~~ 51.69 ggml.cpp/examples/starcoder/main.cpp:821:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.69 821 | for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) { 51.69 | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51.69 ggml.cpp/examples/starcoder/main.cpp:837:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.69 837 | if (i >= embd_inp.size()) { 51.69 | ~~^~~~~~~~~~~~~~~~~~ 51.69 ggml.cpp/examples/starcoder/main.cpp:859:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.69 859 | for (int k = i; k < embd_inp.size(); k++) { 51.69 | ~~^~~~~~~~~~~~~~~~~ 51.69 ggml.cpp/examples/starcoder/main.cpp:861:33: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare] 51.69 861 | if (embd.size() >= params.n_batch) { 51.69 | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 51.70 starcoder.cpp: In function 'int starcoder_predict(void*, void*, char*)': 51.70 starcoder.cpp:80:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.70 80 | for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) { 51.70 | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51.70 starcoder.cpp:96:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.70 96 | if (i >= embd_inp.size()) { 51.70 | ~~^~~~~~~~~~~~~~~~~~ 51.70 starcoder.cpp:118:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 51.70 118 | for (int k = i; k < embd_inp.size(); k++) { 51.70 | ~~^~~~~~~~~~~~~~~~~ 51.70 starcoder.cpp:120:33: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare] 51.70 120 | if (embd.size() >= params.n_batch) { 51.70 | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 51.70 starcoder.cpp:36:19: warning: unused variable 't_main_start_us' [-Wunused-variable] 51.70 36 | const int64_t t_main_start_us = ggml_time_us(); 51.70 | ^~~~~~~~~~~~~~~ 51.70 starcoder.cpp:47:13: warning: unused variable 't_load_us' [-Wunused-variable] 51.70 47 | int64_t t_load_us = 0; 51.70 | ^~~~~~~~~ 54.70 g++ -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native falcon.cpp -o falcon.o -c 55.89 In file included from falcon.cpp:19: 55.89 implementations/falcon.cpp: In function 'bool falcon_model_load(const string&, falcon_model&, gpt_vocab&)': 55.89 implementations/falcon.cpp:187:13: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.89 187 | .mem_size = ctx_size, 55.89 | ^ 55.89 implementations/falcon.cpp:188:13: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.89 188 | .mem_buffer = NULL, 55.89 | ^ 55.89 implementations/falcon.cpp:189:13: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.89 189 | .no_alloc = false, 55.89 | ^ 55.91 In file included from falcon.cpp:19: 55.91 implementations/falcon.cpp: In function 'bool falcon_eval(const falcon_model&, int, int, const std::vector&, std::vector&, size_t&)': 55.91 implementations/falcon.cpp:410:9: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.91 410 | .mem_size = buf_size, 55.91 | ^ 55.91 implementations/falcon.cpp:411:9: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.91 411 | .mem_buffer = buf, 55.91 | ^ 55.91 implementations/falcon.cpp:412:9: warning: C++ designated initializers only available with '-std=c++2a' or '-std=gnu++2a' [-Wpedantic] 55.91 412 | .no_alloc = false, 55.91 | ^ 55.93 falcon.cpp: In function 'int falcon_predict(void*, void*, char*)': 55.93 falcon.cpp:69:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 55.93 69 | for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) { 55.93 | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55.94 falcon.cpp:85:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 55.94 85 | if (i >= embd_inp.size()) { 55.94 | ~~^~~~~~~~~~~~~~~~~~ 55.94 falcon.cpp:107:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 55.94 107 | for (int k = i; k < embd_inp.size(); k++) { 55.94 | ~~^~~~~~~~~~~~~~~~~ 55.94 falcon.cpp:109:33: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare] 55.94 109 | if (embd.size() > params.n_batch) { 55.94 | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ 55.94 falcon.cpp:36:19: warning: unused variable 't_main_start_us' [-Wunused-variable] 55.94 36 | const int64_t t_main_start_us = ggml_time_us(); 55.94 | ^~~~~~~~~~~~~~~ 55.94 falcon.cpp:48:13: warning: unused variable 't_load_us' [-Wunused-variable] 55.94 48 | int64_t t_load_us = 0; 55.94 | ^~~~~~~~~ 58.19 g++ -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native gptj.cpp -o gptj.o -c 59.27 In file included from gptj.cpp:19: 59.27 ggml.cpp/examples/gpt-j/main.cpp: In function 'int main_gptj(int, char**)': 59.27 ggml.cpp/examples/gpt-j/main.cpp:674:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.27 674 | for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) { 59.27 | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59.27 ggml.cpp/examples/gpt-j/main.cpp:690:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.27 690 | if (i >= embd_inp.size()) { 59.27 | ~~^~~~~~~~~~~~~~~~~~ 59.27 ggml.cpp/examples/gpt-j/main.cpp:712:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.27 712 | for (int k = i; k < embd_inp.size(); k++) { 59.27 | ~~^~~~~~~~~~~~~~~~~ 59.27 ggml.cpp/examples/gpt-j/main.cpp:714:33: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare] 59.27 714 | if (embd.size() > params.n_batch) { 59.27 | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ 59.28 gptj.cpp: In function 'int gptj_predict(void*, void*, char*)': 59.28 gptj.cpp:72:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.28 72 | for (int i = embd.size(); i < embd_inp.size() + params.n_predict; i++) { 59.28 | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59.28 gptj.cpp:88:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.28 88 | if (i >= embd_inp.size()) { 59.28 | ~~^~~~~~~~~~~~~~~~~~ 59.28 gptj.cpp:110:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] 59.28 110 | for (int k = i; k < embd_inp.size(); k++) { 59.28 | ~~^~~~~~~~~~~~~~~~~ 59.28 gptj.cpp:112:33: warning: comparison of integer expressions of different signedness: 'std::vector::size_type' {aka 'long unsigned int'} and 'int32_t' {aka 'int'} [-Wsign-compare] 59.28 112 | if (embd.size() > params.n_batch) { 59.28 | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ 59.29 gptj.cpp:36:19: warning: unused variable 't_main_start_us' [-Wunused-variable] 59.29 36 | const int64_t t_main_start_us = ggml_time_us(); 59.29 | ^~~~~~~~~~~~~~~ 59.29 gptj.cpp:48:13: warning: unused variable 't_load_us' [-Wunused-variable] 59.29 48 | int64_t t_load_us = 0; 59.29 | ^~~~~~~~~ 61.87 g++ -I. -I./ggml.cpp/include -I./ggml.cpp/include/ggml/ -I./ggml.cpp/examples/ -O3 -DNDEBUG -std=c++17 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native mpt.cpp -o mpt.o -c 62.91 In file included from mpt.cpp:19: 62.91 ggml.cpp/examples/mpt/main.cpp: In function 'bool mpt_model_load(const string&, mpt_model&, gpt_vocab&)': 62.91 ggml.cpp/examples/mpt/main.cpp:246:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<wchar_t>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 62.91 246 | for (int w = 0; w < word_multibytes.size(); w++) { 62.91 | ~~^~~~~~~~~~~~~~~~~~~~~~~~ 62.96 mpt.cpp: In function 'int mpt_predict(void*, void*, char*)': 62.96 mpt.cpp:37:19: warning: unused variable 't_main_start_us' [-Wunused-variable] 62.96 37 | const int64_t t_main_start_us = ggml_time_us(); 62.96 | ^~~~~~~~~~~~~~~ 62.96 mpt.cpp:49:13: warning: unused variable 't_load_us' [-Wunused-variable] 62.96 49 | int64_t t_load_us = 0; 62.96 | ^~~~~~~~~ 65.82 mkdir build 65.82 cd build && cmake ../ggml.cpp && make VERBOSE=1 ggml && cp -rf src/CMakeFiles/ggml.dir/ggml.c.o ../ggml.o 66.08 CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): 66.08 Compatibility with CMake < 3.5 will be removed from a future version of 66.08 CMake. 66.08 66.08 Update the VERSION argument value or use a ... suffix to tell 66.08 CMake that the project does not need compatibility with older versions. 66.08 66.08 66.22 -- The C compiler identification is GNU 10.2.1 66.37 -- The CXX compiler identification is GNU 10.2.1 66.43 -- Detecting C compiler ABI info 66.59 -- Detecting C compiler ABI info - done 66.62 -- Check for working C compiler: /usr/bin/cc - skipped 66.62 -- Detecting C compile features 66.62 -- Detecting C compile features - done 66.65 -- Detecting CXX compiler ABI info 66.80 -- Detecting CXX compiler ABI info - done 66.84 -- Check for working CXX compiler: /usr/bin/c++ - skipped 66.84 -- Detecting CXX compile features 66.84 -- Detecting CXX compile features - done 66.87 -- Found Git: /usr/bin/git (found version "2.30.2") 66.91 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD 67.05 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed 67.05 -- Looking for pthread_create in pthreads 67.14 -- Looking for pthread_create in pthreads - not found 67.14 -- Looking for pthread_create in pthread 67.27 -- Looking for pthread_create in pthread - found 67.28 -- Found Threads: TRUE
67.28 -- CMAKE_SYSTEM_PROCESSOR: x86_64 67.29 -- x86 detected 67.29 -- Linux detected 67.32 -- x86 detected 67.32 -- Linux detected 67.33 CMake Error at tests/CMakeLists.txt:145 (set_target_properties): 67.33 set_target_properties called with incorrect number of arguments. 67.33 67.33 67.35 -- Configuring incomplete, errors occurred! 67.37 make[1]: Leaving directory '/build/go-ggml-transformers' 67.37 make[1]: *** [Makefile:150: ggml.o] Error 1 67.37 make: *** [Makefile:184: go-ggml-transformers/libtransformers.a] Error 2


Dockerfile:104

102 | COPY .git . 103 |
104 | >>> RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build 105 |
106 | ###################################

ERROR: failed to solve: process "/bin/sh -c ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build" did not complete successfully: exit code: 2 ERROR: Service 'api' failed to build : Build failed

Additional context Very excited to help support this project, appreciate your help in fixing this bug.

Agility0493 avatar Aug 17 '23 17:08 Agility0493

:warning::warning::warning::warning::warning:

Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!

but.... I can also be funny or helpful :smile_cat: and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.

Don't engage in conversation with me, I don't support (yet) replying!

:warning::warning::warning::warning::warning:

Sources:

  • https://localai.io/basics/getting_started/index.html
  • https://localai.io/howtos/easy-setup-docker-gpu/index.html
  • https://github.com/go-skynet/LocalAI/tree/master/examples/langchain/docker-compose.yaml

localai-bot avatar Aug 19 '23 12:08 localai-bot

I get the same error from a macbook M2, I am currently trying to find a commit where the build work as I was able to build it in the last few weeks. I went to a 12 August commit but I have another build error there.

flotos avatar Aug 28 '23 13:08 flotos

EDIT: I do not get this error when building normaly, but when using docker buildx build --platform linux/amd64 -t llm-amd64 .

flotos avatar Aug 28 '23 15:08 flotos

This is an issue for me on x86_64. It may be related to #720

Darin755 avatar Sep 06 '23 18:09 Darin755

Same issue here on Ubuntu 22.04

gururise avatar Oct 09 '23 18:10 gururise

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 04 '25 02:12 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Dec 10 '25 02:12 github-actions[bot]