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 inference
https://localai.io
MIT License
24.41k stars 1.87k forks source link

Docker Container failed to start (no rule to make target build) #615

Open iocron opened 1 year ago

iocron commented 1 year ago

LocalAI version: quay.io/go-skynet/local-ai (latest)

Environment, CPU architecture, OS, and Version: Docker version 24.0.1, build 6802122 Ubuntu 22.04.2 LTS Linux ai-server 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug Starting the container does not work. docker-compose up -d and docker run localai returns only:

make: *** No rule to make target 'build'.  Stop.

To Reproduce

docker-compose up -d
Creating network "localai_default" with the default driver
Building api
[+] Building 830.1s (21/21) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 1.83kB                                                                             0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 125B                                                                                  0.0s
 => [internal] load metadata for docker.io/library/golang:1.20                                                     1.3s
 => [internal] load build context                                                                                  0.1s
 => => transferring context: 315.21kB                                                                              0.0s
 => [requirements 1/5] FROM docker.io/library/golang:1.20@sha256:6b3fa4b908676231b50acbbc00e84d8cee9c6ce072b1175  13.4s
 => => resolve docker.io/library/golang:1.20@sha256:6b3fa4b908676231b50acbbc00e84d8cee9c6ce072b1175c0ff352c57d8a6  0.1s
 => => sha256:3164c26b2e170b18e2325aa0554699e7bb19a658333601659c04838855897f7a 1.58kB / 1.58kB                     0.0s
 => => sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 24.03MB / 24.03MB                   0.4s
 => => sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 64.11MB / 64.11MB                   1.0s
 => => sha256:6b3fa4b908676231b50acbbc00e84d8cee9c6ce072b1175c0ff352c57d8a612f 2.36kB / 2.36kB                     0.0s
 => => sha256:e5ba91fc310d476e7136a29286b86513a007501ba379d13de3793ceeaec3b4e3 6.79kB / 6.79kB                     0.0s
 => => sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 49.55MB / 49.55MB                   0.8s
 => => sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 92.23MB / 92.23MB                   1.7s
 => => extracting sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4                          2.4s
 => => sha256:f29ea5e6b3160c1b3cc09100f575f386ed3f968c3d0fbb76677a5c6056a44275 100.20MB / 100.20MB                 2.0s
 => => sha256:c1c5b70020e43c956ded66d55bf09315909aaaa36b9e6aaac1cc87ebb51b3b4c 156B / 156B                         1.1s
 => => extracting sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00                          0.6s
 => => extracting sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf                          2.5s
 => => extracting sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11                          2.5s
 => => extracting sha256:f29ea5e6b3160c1b3cc09100f575f386ed3f968c3d0fbb76677a5c6056a44275                          3.7s
 => => extracting sha256:c1c5b70020e43c956ded66d55bf09315909aaaa36b9e6aaac1cc87ebb51b3b4c                          0.0s
 => [requirements 2/5] RUN apt-get update &&     apt-get install -y ca-certificates cmake curl                     5.3s
 => [requirements 3/5] RUN if [ "" = "cublas" ]; then     apt-get install -y software-properties-common &&     ap  0.3s
 => [requirements 4/5] RUN apt-get install -y libopenblas-dev                                                      2.5s
 => [requirements 5/5] RUN apt-get install -y libopencv-dev &&     ln -s /usr/include/opencv4/opencv2 /usr/inclu  45.0s
 => [builder 1/7] WORKDIR /build                                                                                   0.0s
 => [stage-2 1/4] RUN if [ "${FFMPEG}" = "true" ]; then     apt-get install -y ffmpeg     ; fi                     0.4s
 => [builder 2/7] COPY Makefile .                                                                                  0.0s
 => [builder 3/7] RUN make get-sources                                                                            47.7s
 => [stage-2 2/4] WORKDIR /build                                                                                   0.0s
 => [builder 4/7] COPY go.mod .                                                                                    0.0s
 => [builder 5/7] RUN make prepare                                                                               629.8s
 => [builder 6/7] COPY . .                                                                                         0.1s
 => [builder 7/7] RUN make build                                                                                  66.6s
 => [stage-2 3/4] COPY --from=builder /build/local-ai ./                                                           0.1s
 => [stage-2 4/4] COPY entrypoint.sh .                                                                             0.0s
 => exporting to image                                                                                            17.1s
 => => exporting layers                                                                                           17.0s
 => => writing image sha256:0c8906ea9e6d4365ab690872e3b968e71def32d0ccaf6a4353af910ff89d0daa                       0.0s
 => => naming to quay.io/go-skynet/local-ai:latest

Expected behavior Docker container should start, but doesnt.

Logs

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:

I'm sorry for the confusion, but it seems like the issue is with the code in the Dockerfile and not with the Github assistant. The error message indicates that there might be a problem with the build process of the container image. It could be due to missing dependencies or incorrect configuration in the Dockerfile. I recommend checking the code in the Dockerfile and making sure all the required dependencies are installed and configured correctly. If you need further assistance, please provide the full code of the Dockerfile so that I can help you troubleshoot the issue.

Sources: