mudler / LocalAI

:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted and local-first. Drop-in replacement for OpenAI, running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. Features: Generate Text, Audio, Video, Images, Voice Cloning, Distributed, P2P inference
https://localai.io
MIT License
26.49k stars 1.98k forks source link

Make Build Fails When Building From Release Assets #1327

Open kevinkuan1969 opened 1 year ago

kevinkuan1969 commented 1 year ago

Pretty new to LocalAI and still learning as much as possible from everyone from this group. My objective is sertup LocalAI so that i can integrate with Nextcloud instance.

So far i have managed to clone LocalAI from git clone https://github.com/go-skynet/LocalAI and use luna-ai-llama2 as model with tht following

curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "luna-ai-llama2", "messages": [{"role": "user", "content": "How are you?"}], "temperature": 0.9 }'

Next step and try to build using 'make build' command and encountered the following error and halted:

go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/root/LocalAI/sources/gpt4all/gpt4all-bindings/golang make: go: No such file or directory make: *** [Makefile:229: replace] Error 127

Also double check no such URL exist in https://github.com/nomic-ai/gpt4all/gpt4all-bindings/golang.

jamesbraza commented 1 year ago

Do you have go installed in your system? What is your go version output?

lunamidori5 commented 1 year ago

@kevinkuan1969 If your on master please go to image 1.40v or 1.30v for now, they are doing a full rework of master right now for 2.0v

localai-bot commented 1 year ago

: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 :smilecat: 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:

It seems like you are trying to build the LocalAI binary using the make build command, but you are missing the required dependencies. The error message suggests that the gpt4all-bindings/golang directory is not found in your system. To fix this issue, you can try the following steps:

  1. Make sure you have installed the required dependencies by running make prepare command in the LocalAI project directory. This will download and install all the necessary dependencies for building the binary.
  2. If you are still having issues with missing dependencies, you can try cloning the gpt4all-bindings/golang directory from the GitHub repository directly using the following command:
    git clone https://github.com/nomic-ai/gpt4all/golang.git /path/to/LocalAI/sources/gpt4all/golang

    Replace /path/to/LocalAI with the actual path to your LocalAI project directory. This will download the missing gpt4all-bindings/golang directory to your system.

  3. Once you have installed all the required dependencies, you can try building the binary again using the make build command. I hope this helps! Let me know if you have any further questions or issues.

Sources:

kevinkuan1969 commented 1 year ago

Do you have go installed in your system? What is your go version output?

go version go1.21.1 linux/amd64

@kevinkuan1969 If your on master please go to image 1.40v or 1.30v for now, they are doing a full rework of master right now for 2.0v

After clone ~/LocalAI-1.40.0, perform the BUILD using Docker and Make also failed:

DOCKER image

Make

image

image

kevinkuan1969 commented 1 year ago

Also tested in version LoalAI 1.30, both build method produced the same errors.

jamesbraza commented 1 year ago

The Docker error looks like .git folder isn't present. Are you invoking the make build from the LocalAI repo root? Can you run ls -la to confirm .git is there?

Also, the make error says cmake isn't found. Can you run cmake --version to check that it's installed?

kevinkuan1969 commented 1 year ago

The Docker error looks like .git folder isn't present. Are you invoking the make build from the LocalAI repo root? Can you run ls -la to confirm .git is there?

Cannot find .gif folder. Yes and invoking 'make build' inside LocalAI folder. Please find below the print-screen of the directory image

Also, the make error says cmake isn't found. Can you run cmake --version to check that it's installed?

image

jamesbraza commented 1 year ago

How did you get the LocalAI code on your computer, did you not git clone? Otherwise you'd have a .git folder. It looks like .git copying enables git status to work: https://github.com/mudler/LocalAI/commit/6d19a8bdb5a58b5ec546ef3fbf3bc4fe93756170. Are you able to run git init to create a .git folder?

Also, just wondering, why are you directly running make build instead of docker compose up?

kevinkuan1969 commented 1 year ago

How did you get the LocalAI code on your computer, did you not git clone? Otherwise you'd have a .git folder. It looks like .git copying enables git status to work: [6d19a8b]

I did not use git clone because the v14 is referring to https://github.com/mudler/LocalAI.git same as master copy. I used 'wget https://github.com/mudler/LocalAI/archive/refs/tags/v1.40.0.zip' and unzip. image

Also, just wondering, why are you directly running make build instead of docker compose up? Understand from below, we can build either using 'docker build' or 'make build'. I tried both because none is successful. We are ok with either one.
image

jamesbraza commented 1 year ago

I see per wget, yeah it's a valid use case thanks. Cc @mudler for .git not always being present.

@kevinkuan1969 what do you think of renaming this issue to be:

make build fails when building from release assets


In the meantime, can you run git init after unzipping? That will hopefully unblock you, just know the VERSION in the Makefile won't be correct.

kevinkuan1969 commented 1 year ago

@kevinkuan1969 what do you think of renaming this issue to be:

make build fails when building from release assets

No problem and please go ahead. Thanks.

jamesbraza commented 1 year ago

@kevinkuan1969 unfortunately I don't have the permissions to rename your issue, I am not a repo admin

kevinkuan1969 commented 1 year ago

@kevinkuan1969 what do you think of renaming this issue to be:

make build fails when building from release assets

Done and thanks.

kevinkuan1969 commented 1 year ago

Still face the problem when performing BUILD 1. sudo make build

image

  1. sudo docker build -t localai .

image

pomazanbohdan commented 11 months ago

git master build error

touch get-sources
go mod edit -replace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang=/opt/docker/LocalAI/sources/gpt4all/gpt4all-bindings/golang
make: go: No such file or directory
make: *** [Makefile:238: replace] Error 127
mrbeandev commented 11 months ago

i am also getting the same error

PS E:\AI\GPT\LocalAI> make build
process_begin: CreateProcess(NULL, uname -s, ...) failed.
Makefile:56: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, uname -m, ...) failed.
Makefile:57: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, tput -Txterm setaf 2, ...) failed.
Makefile:58: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, tput -Txterm setaf 3, ...) failed.
Makefile:59: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, tput -Txterm setaf 7, ...) failed.
Makefile:60: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, tput -Txterm setaf 6, ...) failed.
Makefile:61: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, tput -Txterm sgr0, ...) failed.
Makefile:62: pipe: Bad file descriptor
process_begin: CreateProcess(NULL, uname -s, ...) failed.
Makefile:68: pipe: Bad file descriptor
touch get-sources
process_begin: CreateProcess(NULL, touch get-sources, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:235: get-sources] Error 2
PS E:\AI\GPT\LocalAI>

please help me out

i followed instructions form here : https://localai.io/basics/build/

git clone https://github.com/go-skynet/LocalAI
cd LocalAI
make build

my pc has 32 GB CPU ram and 6 GB GPU too it has GO, Make, Git all installed still cant find whats the issue is !!

PS E:\AI\GPT\LocalAI> make -v
GNU Make 4.4.1
Built for Windows32
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
PS E:\AI\GPT\LocalAI> go version
go version go1.21.5 windows/amd64
PS E:\AI\GPT\LocalAI> git -v
git version 2.43.0.windows.1
PS E:\AI\GPT\LocalAI>