Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 1a26fcf

Browse files
Dockerfile.ubi: use tensorizer (#64)
add libsodium for tensorizer encryption --------- Signed-off-by: Prashant Gupta <[email protected]> Co-authored-by: Daniele <[email protected]>
1 parent 8720c92 commit 1a26fcf

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

Dockerfile.ubi

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@ RUN --mount=type=cache,target=/root/.cache/ccache \
125125
CMAKE_BUILD_TYPE=Release \
126126
python3 setup.py bdist_wheel --dist-dir=dist
127127

128+
#################### libsodium Build IMAGE ####################
129+
FROM base as libsodium-builder
130+
131+
RUN microdnf install -y gcc gzip \
132+
&& microdnf clean all
133+
134+
WORKDIR /usr/src/libsodium
135+
136+
ARG LIBSODIUM_VERSION=1.0.20
137+
RUN curl -LO https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}-RELEASE/libsodium-${LIBSODIUM_VERSION}.tar.gz \
138+
&& tar -xzvf libsodium*.tar.gz \
139+
&& rm -f libsodium*.tar.gz \
140+
&& mv libsodium*/* ./
141+
142+
RUN ./configure --prefix="/usr/" && make && make check
143+
128144
## Release #####################################################################
129145
FROM python-install AS vllm-openai
130146

@@ -143,7 +159,12 @@ COPY extras/custom_cache_manager.py /opt/vllm/lib/python3.11/site-packages/custo
143159
# install vllm wheel first, so that torch etc will be installed
144160
RUN --mount=type=bind,from=build,src=/workspace/dist,target=/workspace/dist \
145161
--mount=type=cache,target=/root/.cache/pip \
146-
pip install dist/*.whl --verbose
162+
pip install $(echo dist/*.whl)'[tensorizer]' --verbose
163+
164+
# Install libsodium for Tensorizer encryption
165+
RUN --mount=type=bind,from=libsodium-builder,src=/usr/src/libsodium,target=/usr/src/libsodium \
166+
cd /usr/src/libsodium \
167+
&& make install
147168

148169
ENV HF_HUB_OFFLINE=1 \
149170
PORT=8000 \

0 commit comments

Comments
 (0)