diff --git a/.github/workflows/image_build.yml b/.github/workflows/image_build.yml index fb1985fd..7d60d23a 100644 --- a/.github/workflows/image_build.yml +++ b/.github/workflows/image_build.yml @@ -201,26 +201,6 @@ jobs: username: ${{ secrets.quayUsername }} password: ${{ secrets.quayPassword }} - - name: Cache GRPC - uses: docker/build-push-action@v5 - with: - builder: ${{ steps.buildx.outputs.name }} - # The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache. - # This means that even the MAKEFLAGS have to be an EXACT match. - # If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch. - build-args: | - GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }} - GRPC_MAKEFLAGS=--jobs=4 --output-sync=target - GRPC_VERSION=v1.58.0 - context: . - file: ./Dockerfile - cache-from: type=gha - target: grpc - platforms: ${{ inputs.platforms }} - push: false - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - name: Build and push uses: docker/build-push-action@v5 with: @@ -248,14 +228,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: Inspect image - if: github.event_name != 'pull_request' - run: | - docker pull localai/localai:${{ steps.meta.outputs.version }} - docker image inspect localai/localai:${{ steps.meta.outputs.version }} - docker pull quay.io/go-skynet/local-ai:${{ steps.meta.outputs.version }} - docker image inspect quay.io/go-skynet/local-ai:${{ steps.meta.outputs.version }} - - name: Build and push AIO image if: inputs.aio != '' uses: docker/build-push-action@v5 diff --git a/Dockerfile b/Dockerfile index 717b3a3a..1c4e24fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -148,16 +148,16 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN git clone --recurse-submodules --jobs 4 -b ${GRPC_VERSION} --depth 1 --shallow-submodules https://github.com/grpc/grpc - -WORKDIR /build/grpc/cmake/build - # We install GRPC to a different prefix here so that we can copy in only the build artifacts later # saves several hundred MB on the final docker image size vs copying in the entire GRPC source tree # and running make install in the target container -RUN cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt/grpc ../.. && \ +RUN git clone --recurse-submodules --jobs 4 -b ${GRPC_VERSION} --depth 1 --shallow-submodules https://github.com/grpc/grpc && \ + mkdir -p /build/grpc/cmake/build && \ + cd /build/grpc/cmake/build && \ + cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=/opt/grpc ../.. && \ make && \ - make install + make install && \ + rm -rf /build ################################### ###################################