diff --git a/.dockerignore b/.dockerignore index cf963888..979a26a3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,4 @@ models examples/chatbot-ui/models examples/rwkv/models examples/**/models +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index fd365962..d9354e6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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