Skip to content

Commit

Permalink
fix: missing OpenCL libraries from docker containers during clblas do…
Browse files Browse the repository at this point in the history
…cker build (mudler#1830)
  • Loading branch information
cryptk authored Mar 14, 2024
1 parent f820657 commit a6b5407
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ models
examples/chatbot-ui/models
examples/rwkv/models
examples/**/models
Dockerfile
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ COPY . .
COPY .git .
RUN make prepare

# If we are building with clblas support, we need the libraries for the builds
RUN if [ "${BUILD_TYPE}" = "clblas" ]; then \
apt-get update && \
apt-get install -y libclblast-dev && \
apt-get clean \
; fi

# stablediffusion does not tolerate a newer version of abseil, build it first
RUN GRPC_BACKENDS=backend-assets/grpc/stablediffusion make build

Expand Down Expand Up @@ -148,6 +155,13 @@ RUN if [ "${FFMPEG}" = "true" ]; then \
apt-get install -y ffmpeg && apt-get clean \
; fi

# Add OpenCL
RUN if [ "${BUILD_TYPE}" = "clblas" ]; then \
apt-get update && \
apt-get install -y libclblast1 && \
apt-get clean \
; fi

WORKDIR /build

# we start fresh & re-copy all assets because `make build` does not clean up nicely after itself
Expand Down

0 comments on commit a6b5407

Please sign in to comment.