Skip to content

Commit

Permalink
Dockerfile.rocm.ubi: make sure the venv's torch libraries are available
Browse files Browse the repository at this point in the history
this makes sure that the shared libraries in the python venv are found
by the linker.
  • Loading branch information
dtrifiro committed Nov 13, 2024
1 parent fbaab94 commit 1024f99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile.rocm.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ ENV LD_LIBRARY_PATH="$VIRTUAL_ENV/lib/python${PYTHON_VERSION}/site-packages/pill
ENV LD_LIBRARY_PATH="$VIRTUAL_ENV/lib/python${PYTHON_VERSION}/site-packages/triton/backends/amd/lib:$LD_LIBRARY_PATH"
ENV LD_LIBRARY_PATH="$VIRTUAL_ENV/lib/python${PYTHON_VERSION}/site-packages/torch/lib:$LD_LIBRARY_PATH"

RUN echo $LD_LIBRARY_PATH | tr : \\n >> /etc/ld.so.conf.d/torch-venv.conf && \
ldconfig

FROM rocm_base as rocm_devel

ENV CCACHE_DIR=/root/.cache/ccache
Expand Down Expand Up @@ -153,7 +156,6 @@ ENV VLLM_INSTALL_PUNICA_KERNELS=1
RUN --mount=type=cache,target=/root/.cache/ccache \
--mount=type=cache,target=/root/.cache/pip \
--mount=type=cache,target=/root/.cache/uv \
ln -s /opt/vllm/lib64/python${PYTHON_VERSION}/site-packages/torch/lib/libroctx64.so /opt/rocm/lib/libroctx64.so && \
uv pip install -v -U \
ninja setuptools-scm>=8 "cmake>=3.26" packaging && \
env CFLAGS="-march=haswell" \
Expand Down

0 comments on commit 1024f99

Please sign in to comment.