File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
jupyter/rocm/tensorflow/ubi9-python-3.12 Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -158,4 +158,9 @@ RUN echo "Installing softwares and packages" && \
158158
159159COPY ${JUPYTER_REUSABLE_UTILS}/usercustomize.pth ${JUPYTER_REUSABLE_UTILS}/monkey_patch_protobuf_6x.py /opt/app-root/lib/python3.12/site-packages/
160160
161+ USER 0
162+ COPY ${TENSORFLOW_SOURCE_CODE}/utils/link-solibs.sh /tmp/link-solibs.sh
163+ RUN /tmp/link-solibs.sh && rm /tmp/link-solibs.sh
164+ USER 1001
165+
161166WORKDIR /opt/app-root/src
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -Eeuo pipefail
3+
4+ # TensorFlow-ROCm wants to link with `*.so` libraries without version suffixes.
5+ # This would require us to install the -devel packages, but that's cumbersome with AIPCC bases.
6+ # Therefore, simply create symlinks to the versioned libraries and (IMPORTANT!) run ldconfig afterwards.
7+
8+ ROCM_PATH=/opt/rocm-6.3.4
9+ find " $ROCM_PATH /lib" -name ' *.so.*' -type f -print0 |
10+ while IFS= read -r -d ' ' f; do
11+ dir=${f%/* } # /opt/rocm-6.3.4/lib (or sub-dir)
12+ bn=${f##*/ } # libMIOpen.so.1.0.60304
13+ base=${bn%% .so* } # libMIOpen
14+ soname=$base .so # libMIOpen.so
15+ link=$dir /$soname # /opt/rocm-6.3.4/lib/libMIOpen.so
16+ [[ -e $link ]] && continue
17+ echo " ln -s $bn → $link "
18+ ln -s " $bn " " $link "
19+ done
20+
21+ # Run ldconfig to update the cache.
22+ ldconfig
You can’t perform that action at this time.
0 commit comments