diff --git a/Dockerfile.ubi b/Dockerfile.ubi index d4989f726..74a83af47 100644 --- a/Dockerfile.ubi +++ b/Dockerfile.ubi @@ -224,6 +224,22 @@ RUN --mount=type=cache,target=/root/.cache/ccache \ --mount=type=cache,target=/root/.cache/pip \ CMAKE_BUILD_TYPE=Release python3 setup.py bdist_wheel --dist-dir=dist +#################### libsodium Build IMAGE #################### +FROM base as libsodium-builder + +RUN microdnf install -y gcc gzip \ + && microdnf clean all + +WORKDIR /usr/src/libsodium + +ARG LIBSODIUM_VERSION=1.0.19 +RUN curl -LO https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}-RELEASE/libsodium-${LIBSODIUM_VERSION}.tar.gz \ + && tar -xzvf libsodium*.tar.gz \ + && rm -f libsodium*.tar.gz \ + && mv libsodium*/* ./ + +RUN ./configure && make && make check + ## Release ##################################################################### # Note from the non-UBI Dockerfile: # We used base cuda image because pytorch installs its own cuda libraries. @@ -272,6 +288,12 @@ RUN microdnf install -y gcc \ # patch triton (fix for #720) COPY triton_patch/custom_cache_manager.py /opt/vllm/lib/python3.11/site-packages/triton/runtime/custom_cache_manager.py +# Install libsodium for Tensorizer encryption +RUN --mount=type=bind,from=libsodium-builder,src=/usr/src/libsodium,target=/usr/src/libsodium \ + cd /usr/src/libsodium \ + && make install +ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + ENV HF_HUB_OFFLINE=1 \ PORT=8000 \ GRPC_PORT=8033 \