Skip to content

Commit 05be170

Browse files
authored
2.5.10 dockerfile + compile bundle update (#5087)
* update dockerfiles to work with conda * change rpath setting mechanism * simplify compile bundle bash script usage * update dependent dpcpp rt to 2025.0.2 * remove undesired environment variable configuration scripts installed from intel-opencl-rt pypi package * variable setting bug fix in compile bundle * update dpcpp-cpp-rt to 2025.0.3 to fix the OCL_ICD_VENDORS issue * add USE_AOT_DEVLIST retrieval api * update dpcpp-cpp-rt to 2025.0.4
1 parent 99e3f0c commit 05be170

File tree

14 files changed

+524
-328
lines changed

14 files changed

+524
-328
lines changed

csrc/gpu/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ set(IPEX_GPU_CORE_SRC
7070
${IPEX_GPU_GEN_FILES}
7171
${IPEX_UTILS_SRCS})
7272

73-
if(NOT WINDOWS)
74-
foreach(RPATH ${RPATHS_LIST})
75-
set(IPEX_SYCL_LINK_FLAGS ${IPEX_SYCL_LINK_FLAGS} ${RPATH})
76-
endforeach()
77-
set(IPEX_SYCL_LINK_FLAGS ${IPEX_SYCL_LINK_FLAGS} "-Wl,--disable-new-dtags")
78-
endif()
79-
8073
# This workaround enables some definitions in PyTorch header file protected by USE_XPU macro.
8174
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_XPU")
8275

dependency_version.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,39 @@
44
"min-version": "12.3.0"
55
},
66
"llvm": {
7-
"version": "16.0.6"
7+
"commit": "llvmorg-16.0.6"
88
},
99
"pytorch": {
10-
"version": "2.3.1+cxx11.abi",
11-
"commit": "v2.3.1"
10+
"version": "2.5.1.post0+xpu",
11+
"commit": "v2.5.1"
1212
},
1313
"torchaudio": {
14-
"version": "2.3.1+cxx11.abi",
15-
"commit": "v2.3.1"
14+
"version": "2.5.1.post0+xpu",
15+
"commit": "v2.5.1"
1616
},
1717
"torchvision": {
18-
"version": "0.18.1+cxx11.abi",
19-
"commit": "v0.18.1"
18+
"version": "0.20.1.post0+xpu",
19+
"commit": "v0.20.1"
2020
},
2121
"torch-ccl": {
22-
"version": "2.3.100+xpu",
23-
"commit": "v2.3.100+xpu"
22+
"version": "2.5.10+xpu",
23+
"commit": "v2.5.10+xpu"
2424
},
2525
"basekit": {
2626
"dpcpp-cpp-rt": {
27-
"version": "2024.2.1"
27+
"version": "2025.0.4"
2828
},
2929
"mkl-dpcpp": {
30-
"version": "2024.2.1"
30+
"version": "2025.0.1"
3131
},
3232
"oneccl-devel": {
33-
"version": "2021.13.1"
33+
"version": "2021.14.1"
3434
},
3535
"impi-devel": {
36-
"version": "2021.13.1"
36+
"version": "2021.14.0"
37+
},
38+
"intel-pti": {
39+
"version": "0.10.0"
3740
}
3841
}
3942
}

docker/Dockerfile.compile

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache 2.0
3+
14
# NOTE: To build this you will need a docker version >= 19.03 and DOCKER_BUILDKIT=1
25
#
36
# If you do not use buildkit you are not going to have a good time
@@ -14,14 +17,16 @@ RUN apt update && \
1417
apt full-upgrade -y && \
1518
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \
1619
git \
17-
wget \
1820
curl \
21+
wget \
1922
vim \
2023
patch \
2124
gcc \
2225
g++ \
2326
make \
2427
pkg-config \
28+
unzip \
29+
zip \
2530
software-properties-common \
2631
gnupg \
2732
gpg-agent
@@ -30,10 +35,9 @@ RUN bash ./basekit_driver_install_helper.sh driver
3035

3136
WORKDIR /root
3237

33-
RUN curl -fsSL -v -o miniforge.sh -O https://github.com/conda-forge/miniforge/releases/download/24.1.2-0/Miniforge3-24.1.2-0-Linux-x86_64.sh && \
38+
RUN curl -fsSL -v -o miniforge.sh -O https://github.com/conda-forge/miniforge/releases/download/24.7.1-2/Miniforge3-24.7.1-2-Linux-x86_64.sh && \
3439
bash miniforge.sh -b -p ./miniforge3 && \
35-
rm miniforge.sh && \
36-
echo "source ~/miniforge3/bin/activate" >> ./.bashrc
40+
rm miniforge.sh
3741

3842
FROM base AS dev
3943
RUN bash /basekit_driver_install_helper.sh dev
@@ -58,8 +62,13 @@ RUN . ./miniforge3/bin/activate && \
5862
python -m pip install ./wheels/*.whl && \
5963
python -m pip cache purge && \
6064
conda clean -a -y && \
61-
rm -rf ./wheels && \
62-
echo "conda activate py310" >> ./.bashrc && \
63-
echo "export OCL_ICD_VENDORS=/etc/OpenCL/vendors" >> ./.bashrc && \
64-
echo "export CCL_ROOT=${CONDA_PREFIX}" >> ./.bashrc && \
65-
ldpreload=$(bash get_libstdcpp_lib.sh) && echo "export LD_PRELOAD=${ldpreload}" >> ./.bashrc && rm get_libstdcpp_lib.sh
65+
rm -rf ./wheels
66+
RUN ENTRYPOINT=/usr/local/bin/entrypoint.sh && \
67+
echo "#!/bin/bash" > ${ENTRYPOINT} && \
68+
echo "CMDS=(); while [ \$# -gt 0 ]; do CMDS+=(\"\$1\"); shift; done;" >> ${ENTRYPOINT} && \
69+
echo ". ~/miniforge3/bin/activate" >> ${ENTRYPOINT} && \
70+
echo "conda activate py310" >> ${ENTRYPOINT} && \
71+
ldpreload=$(bash get_libstdcpp_lib.sh) && echo "export LD_PRELOAD=${ldpreload}" >> ${ENTRYPOINT} && rm get_libstdcpp_lib.sh && \
72+
echo "\"\${CMDS[@]}\"" >> ${ENTRYPOINT} && \
73+
chmod +x ${ENTRYPOINT}
74+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

examples/gpu/llm/Dockerfile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache 2.0
3+
14
ARG BASE_IMAGE=ubuntu:22.04
25
FROM ${BASE_IMAGE} AS base
36
SHELL ["/bin/bash", "-c"]
@@ -8,15 +11,17 @@ RUN apt update && \
811
apt full-upgrade -y && \
912
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y \
1013
git \
11-
wget \
1214
curl \
15+
wget \
1316
vim \
1417
patch \
1518
gcc \
1619
g++ \
1720
make \
1821
libgomp1 \
1922
pkg-config \
23+
unzip \
24+
zip \
2025
software-properties-common \
2126
gnupg \
2227
gpg-agent
@@ -25,10 +30,9 @@ RUN bash ./basekit_driver_install_helper.sh driver
2530

2631
WORKDIR /root
2732

28-
RUN curl -fsSL -v -o miniforge.sh -O https://github.com/conda-forge/miniforge/releases/download/24.1.2-0/Miniforge3-24.1.2-0-Linux-x86_64.sh && \
33+
RUN curl -fsSL -v -o miniforge.sh -O https://github.com/conda-forge/miniforge/releases/download/24.7.1-2/Miniforge3-24.7.1-2-Linux-x86_64.sh && \
2934
bash miniforge.sh -b -p ./miniforge3 && \
30-
rm miniforge.sh && \
31-
echo "source ~/miniforge3/bin/activate" >> ./.bashrc
35+
rm miniforge.sh
3236

3337
FROM base AS dev
3438
# --build-arg COMPILE=ON to compile from source
@@ -50,8 +54,15 @@ RUN apt clean && \
5054
rm /basekit_driver_install_helper.sh
5155
RUN . ./miniforge3/bin/activate && \
5256
conda create -y -n py310 python=3.10 && conda activate py310 && conda install -y libstdcxx-ng && \
53-
echo "conda activate py310" >> ./.bashrc && \
5457
cd ./llm && \
5558
bash tools/env_setup.sh 1 && \
5659
python -m pip cache purge && \
5760
conda clean -a -y
61+
RUN ENTRYPOINT=/usr/local/bin/entrypoint.sh && \
62+
echo "#!/bin/bash" > ${ENTRYPOINT} && \
63+
echo "CMDS=(); while [ \$# -gt 0 ]; do CMDS+=(\"\$1\"); shift; done;" >> ${ENTRYPOINT} && \
64+
echo ". ~/miniforge3/bin/activate" >> ${ENTRYPOINT} && \
65+
echo "conda activate py310" >> ${ENTRYPOINT} && \
66+
echo "\"\${CMDS[@]}\"" >> ${ENTRYPOINT} && \
67+
chmod +x ${ENTRYPOINT}
68+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

examples/gpu/llm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ conda activate llm
5151
# Setup the environment with the provided script
5252
cd examples/gpu/llm
5353
# If you want to install Intel® Extension for PyTorch\* from source, use the commands below:
54-
# e.g. bash ./tools/env_setup.sh 3 /opt/intel/oneapi/compiler/latest /opt/intel/oneapi/mkl/latest /opt/intel/oneapi/ccl/latest /opt/intel/oneapi/mpi/latest /opt/intel/oneapi/pti/latest pvc
55-
bash ./tools/env_setup.sh 3 <DPCPP_ROOT> <ONEMKL_ROOT> <ONECCL_ROOT> <MPI_ROOT> <PTI_ROOT> <AOT>
54+
# e.g. bash ./tools/env_setup.sh 3 /opt/intel/oneapi pvc
55+
bash ./tools/env_setup.sh 3 <ONEAPI_ROOT_DIR> <AOT>
5656

5757
conda deactivate
5858
conda activate llm

examples/gpu/llm/tools/env_activate.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ fi
1313

1414
BASEFOLDER=$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}" )" &> /dev/null && pwd )
1515
export LD_PRELOAD=$(bash ${BASEFOLDER}/get_libstdcpp_lib.sh)
16-
export OCL_ICD_VENDORS=/etc/OpenCL/vendors
17-
export CCL_ROOT=${CONDA_PREFIX}
1816
export TORCH_LLM_ALLREDUCE=1
1917

2018
cd ${BASEFOLDER}/../${MODE}

0 commit comments

Comments
 (0)