Skip to content

Commit 79b3cb5

Browse files
committed
fix(torch): Include LLVM's libomp5 runtime library
`libomp.so` is a required runtime dependency for AOCL-BLAS+LAPACK.
1 parent 2fd6a25 commit 79b3cb5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

torch/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,14 @@ ARG BUILD_CCACHE_SIZE="1Gi"
9898
# ninja-build, ccache, and lld are optional but improve the build
9999
RUN apt-get -qq update && apt-get -qq install -y \
100100
libncurses5 python3 python3-pip git apt-utils ssh ca-certificates \
101-
libpng-dev libjpeg-dev pkg-config python3-distutils \
101+
libomp5 libpng-dev libjpeg-dev pkg-config python3-distutils \
102102
build-essential ninja-build && \
103103
apt-get clean && \
104104
/usr/bin/python3 -m pip install --no-cache-dir --upgrade pip && \
105105
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
106-
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
106+
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
107+
ln -s libomp.so.5 /usr/lib/x86_64-linux-gnu/libomp.so && \
108+
ldconfig
107109

108110
RUN mkdir /tmp/ccache-install && \
109111
cd /tmp/ccache-install && \
@@ -372,14 +374,16 @@ ENV DEBIAN_FRONTEND=noninteractive
372374
# Install core packages
373375
RUN apt-get -qq update && apt-get -qq install -y \
374376
libncurses5 python3 python3-pip python3-distutils \
375-
libpng16-16 libjpeg-turbo8 libsodium23 \
377+
libomp5 libpng16-16 libjpeg-turbo8 libsodium23 \
376378
curl git apt-utils ssh ca-certificates tmux nano vim-tiny sudo bash \
377379
rsync htop wget unzip tini && \
380+
apt-get clean && \
378381
/usr/bin/python3 -m pip install --no-cache-dir --upgrade pip && \
379382
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
380383
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
381384
update-alternatives --install /usr/bin/vim vim /usr/bin/vim.tiny 1 && \
382-
apt-get clean
385+
ln -s libomp.so.5 /usr/lib/x86_64-linux-gnu/libomp.so && \
386+
ldconfig
383387

384388
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends \
385389
software-properties-common && \

0 commit comments

Comments
 (0)