Skip to content

Commit cd0f103

Browse files
authored
Update Dockerfile.pip
1 parent 3370d0c commit cd0f103

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

docker/Dockerfile.pip

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ RUN apt-get update -y && \
2020
apt-get upgrade -y && \
2121
apt-get install -y --no-install-recommends --fix-missing \
2222
${PYTHON} \
23-
${PYTHON}-pip
23+
${PYTHON}-pip \
24+
google-perftools \
25+
libjemalloc-dev \
26+
numactl
2427

2528
RUN ${PYTHON} -m pip --no-cache-dir install --upgrade \
2629
pip \
27-
setuptools \
28-
psutil
30+
psutil \
31+
setuptools
2932

3033
# Some TF tools expect a "python" binary
3134
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python
@@ -37,8 +40,12 @@ ARG TORCHVISION_VERSION=0.13.0+cpu
3740
ARG TORCH_CPU_URL=https://download.pytorch.org/whl/cpu/torch_stable.html
3841
ARG IPEX_URL=https://software.intel.com/ipex-whl-stable
3942

40-
RUN \
41-
python -m pip install --no-cache-dir \
43+
RUN python -m pip install --no-cache-dir \
44+
intel-openmp \
4245
torch==${PYTORCH_VERSION} torchvision==${TORCHVISION_VERSION} torchaudio==${TORCHAUDIO_VERSION} -f ${TORCH_CPU_URL} && \
4346
python -m pip install --no-cache-dir \
4447
intel_extension_for_pytorch==${IPEX_VERSION} -f ${IPEX_URL}
48+
49+
RUN ln -sf /usr/lib/x86_64-linux-gnu/libjemalloc.so /usr/lib/x86_64-linux-gnu/libtcmalloc.so
50+
ENV DNNL_MAX_CPU_ISA="AVX512_CORE_AMX"
51+
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so:/usr/lib/x86_64-linux-gnu/libtcmalloc.so:/usr/local/lib/libiomp5.so":${LD_PRELOAD}

0 commit comments

Comments
 (0)