diff --git a/.github/workflows/image-pr.yml b/.github/workflows/image-pr.yml index 17456617..aa59188c 100644 --- a/.github/workflows/image-pr.yml +++ b/.github/workflows/image-pr.yml @@ -22,7 +22,7 @@ jobs: platforms: ${{ matrix.platforms }} runs-on: ${{ matrix.runs-on }} base-image: ${{ matrix.base-image }} - makeflags: "-j3" + makeflags: "--jobs=3 --output-sync=target" secrets: dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -81,7 +81,7 @@ jobs: platforms: ${{ matrix.platforms }} runs-on: ${{ matrix.runs-on }} base-image: ${{ matrix.base-image }} - makeflags: "-j3" + makeflags: "--jobs=3 --output-sync=target" secrets: dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 6e93cb9a..40deb0ec 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -27,7 +27,7 @@ jobs: runs-on: ${{ matrix.runs-on }} base-image: ${{ matrix.base-image }} aio: ${{ matrix.aio }} - makeflags: "-j3" + makeflags: "--jobs=3 --output-sync=target" secrets: dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} @@ -207,7 +207,7 @@ jobs: runs-on: ${{ matrix.runs-on }} aio: ${{ matrix.aio }} base-image: ${{ matrix.base-image }} - makeflags: "-j3" + makeflags: "--jobs=3 --output-sync=target" secrets: dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index aa0a270b..6ac816ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -102,7 +102,6 @@ jobs: - name: Dependencies run: | sudo apt-get install -y --no-install-recommends libopencv-dev - sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 - name: Build stablediffusion run: | make backend-assets/grpc/stablediffusion diff --git a/.github/workflows/test-extra.yml b/.github/workflows/test-extra.yml index 68da2c56..5f61835d 100644 --- a/.github/workflows/test-extra.yml +++ b/.github/workflows/test-extra.yml @@ -33,7 +33,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true @@ -62,7 +62,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true @@ -91,7 +91,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true @@ -121,7 +121,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true @@ -152,7 +152,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true @@ -223,7 +223,7 @@ jobs: # sudo apt-get update && \ # sudo apt-get install -y conda # sudo apt-get install -y ca-certificates cmake curl patch - # sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + # sudo apt-get install -y libopencv-dev # sudo rm -rfv /usr/bin/conda || true @@ -255,7 +255,7 @@ jobs: # sudo apt-get update && \ # sudo apt-get install -y conda # sudo apt-get install -y ca-certificates cmake curl patch - # sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + # sudo apt-get install -y libopencv-dev # sudo rm -rfv /usr/bin/conda || true # - name: Test vllm # run: | @@ -281,7 +281,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true - name: Test vall-e-x run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d837821..203aeeca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,7 +75,7 @@ jobs: sudo apt-get update && \ sudo apt-get install -y conda sudo apt-get install -y ca-certificates cmake curl patch - sudo apt-get install -y libopencv-dev && sudo ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2 + sudo apt-get install -y libopencv-dev sudo rm -rfv /usr/bin/conda || true PATH=$PATH:/opt/conda/bin make -C backend/python/sentencetransformers diff --git a/Makefile b/Makefile index 7334ed4f..da91fb2d 100644 --- a/Makefile +++ b/Makefile @@ -224,7 +224,7 @@ sources/go-stable-diffusion: cd sources/go-stable-diffusion && git checkout -b build $(STABLEDIFFUSION_VERSION) && git submodule update --init --recursive --depth 1 sources/go-stable-diffusion/libstablediffusion.a: sources/go-stable-diffusion - $(MAKE) -C sources/go-stable-diffusion libstablediffusion.a + CPATH="$(CPATH):/usr/include/opencv4" $(MAKE) -C sources/go-stable-diffusion libstablediffusion.a ## tiny-dream sources/go-tiny-dream: @@ -263,6 +263,7 @@ dropreplace: $(GOCMD) mod edit -dropreplace github.com/mudler/go-piper $(GOCMD) mod edit -dropreplace github.com/mudler/go-stable-diffusion $(GOCMD) mod edit -dropreplace github.com/nomic-ai/gpt4all/gpt4all-bindings/golang + $(GOCMD) mod edit -dropreplace github.com/go-skynet/go-llama.cpp prepare-sources: get-sources replace $(GOCMD) mod download @@ -531,7 +532,7 @@ backend-assets/grpc/rwkv: sources/go-rwkv sources/go-rwkv/librwkv.a backend-asse $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/rwkv ./backend/go/llm/rwkv backend-assets/grpc/stablediffusion: sources/go-stable-diffusion sources/go-stable-diffusion/libstablediffusion.a backend-assets/grpc - CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=$(CURDIR)/sources/go-stable-diffusion/ LIBRARY_PATH=$(CURDIR)/sources/go-stable-diffusion/ \ + CGO_LDFLAGS="$(CGO_LDFLAGS)" CPATH="$(CPATH):$(CURDIR)/sources/go-stable-diffusion/:/usr/include/opencv4" LIBRARY_PATH=$(CURDIR)/sources/go-stable-diffusion/ \ $(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/stablediffusion ./backend/go/image/stablediffusion backend-assets/grpc/tinydream: sources/go-tiny-dream sources/go-tiny-dream/libtinydream.a backend-assets/grpc @@ -556,7 +557,7 @@ docker: docker build \ --build-arg BASE_IMAGE=$(BASE_IMAGE) \ --build-arg IMAGE_TYPE=$(IMAGE_TYPE) \ - --build-arg GO_TAGS=$(GO_TAGS) \ + --build-arg GO_TAGS="$(GO_TAGS)" \ --build-arg BUILD_TYPE=$(BUILD_TYPE) \ -t $(DOCKER_IMAGE) .