Skip to content

Commit cb6eaab

Browse files
authored
validate 2.1.30 xpu docker (#4168)
* validate 2.1.30xpu docker * add pipefall * correct version tag
1 parent 352517a commit cb6eaab

File tree

3 files changed

+45
-64
lines changed

3 files changed

+45
-64
lines changed

docker/Dockerfile.prebuilt

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2424

2525
RUN apt-get update && \
2626
apt-get install -y --no-install-recommends --fix-missing \
27-
apt-utils \
28-
build-essential \
29-
ca-certificates \
30-
clinfo \
31-
curl \
32-
git \
33-
gnupg2 \
34-
gpg-agent \
35-
rsync \
36-
sudo \
37-
unzip \
38-
wget && \
27+
apt-utils \
28+
build-essential \
29+
ca-certificates \
30+
clinfo \
31+
curl \
32+
git \
33+
gnupg2 \
34+
gpg-agent \
35+
rsync \
36+
sudo \
37+
unzip \
38+
wget && \
3939
apt-get clean && \
4040
rm -rf /var/lib/apt/lists/*
4141

4242
RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
4343
gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
44-
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \
44+
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | \
4545
tee /etc/apt/sources.list.d/intel-gpu-jammy.list
4646

4747
ARG ICD_VER
@@ -58,7 +58,7 @@ RUN apt-get update && \
5858
apt-get clean && \
5959
rm -rf /var/lib/apt/lists/*
6060

61-
RUN no_proxy=$no_proxy wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
61+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
6262
| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \
6363
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
6464
| tee /etc/apt/sources.list.d/oneAPI.list
@@ -69,9 +69,11 @@ ARG CCL_VER
6969

7070
RUN apt-get update && \
7171
apt-get install -y --no-install-recommends --fix-missing \
72-
intel-oneapi-runtime-dpcpp-cpp=${DPCPP_VER} \
73-
intel-oneapi-runtime-mkl=${MKL_VER} \
74-
intel-oneapi-runtime-ccl=${CCL_VER}
72+
intel-oneapi-runtime-dpcpp-cpp=${DPCPP_VER} \
73+
intel-oneapi-runtime-mkl=${MKL_VER} \
74+
intel-oneapi-runtime-ccl=${CCL_VER} && \
75+
apt-get clean && \
76+
rm -rf /var/lib/apt/lists/*
7577

7678
ARG PYTHON
7779
RUN apt-get update && apt install -y software-properties-common
@@ -105,25 +107,10 @@ ARG TORCHVISION_WHL_URL
105107
ARG TORCHAUDIO_WHL_URL
106108
ARG ONECCL_BIND_PT_WHL_URL
107109

108-
RUN python -m pip install numpy
110+
RUN python -m pip install numpy
109111

110112
RUN python -m pip install torch==${TORCH_VERSION} --extra-index-url ${TORCH_WHL_URL} && \
111113
python -m pip install intel_extension_for_pytorch==${IPEX_VERSION} --extra-index-url ${IPEX_WHL_URL} && \
112114
python -m pip install torchvision==${TORCHVISION_VERSION} --extra-index-url ${TORCHVISION_WHL_URL} && \
113115
python -m pip install torchaudio==${TORCHAUDIO_VERSION} --extra-index-url ${TORCHAUDIO_WHL_URL} && \
114-
python -m pip install oneccl_bind_pt==${ONECCL_BIND_PT_VERSION} --extra-index-url ${ONECCL_BIND_PT_WHL_URL}
115-
116-
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64:$LD_LIBRARY_PATH
117-
118-
ARG UNAME
119-
ARG GID
120-
ARG GNAME=render
121-
ARG VNAME=video
122-
123-
RUN useradd -m -s /bin/bash $UNAME
124-
125-
RUN groupadd -g $GID $GNAME
126-
127-
RUN usermod -a -G $VNAME,$GNAME $UNAME
128-
129-
USER $UNAME
116+
python -m pip install oneccl_bind_pt==${ONECCL_BIND_PT_VERSION} --extra-index-url ${ONECCL_BIND_PT_WHL_URL}

docker/README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ docker build -f docker/Dockerfile.compile --build-arg GID_RENDER=$(getent group
2828
Alternatively, `./build.sh` script has docker build command to install prebuilt wheel files, update all the relevant build arguments and execute the script. Run the command below in current directory.
2929

3030
```bash
31+
export IMAGE_TYPE="xpu"
3132
./build.sh
3233
```
3334
To pull docker images use the following command:
3435

3536
```bash
36-
docker pull intel/intel-extension-for-pytorch:xpu
37+
docker pull intel/intel-extension-for-pytorch:2.1.30-xpu
3738
```
3839
### Running container:
3940

4041
Run the following commands to start Intel® Extension for PyTorch\* GPU container. You can use `-v` option to mount your
4142
local directory into the container. The `-v` argument can be omitted if you do not need
42-
access to a local directory in the container. Pass the video and render groups to your
43-
docker container so that the GPU is accessible.
43+
access to a local directory in the container.
4444

4545
```
46-
IMAGE_NAME=intel/intel-extension-for-pytorch:xpu
46+
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.30-xpu
4747
```
4848
```bash
4949
docker run --rm \
@@ -87,18 +87,13 @@ python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch
8787
```
8888

8989
Sample output looks like below:
90+
```bash
91+
2.1.0.post2+cxx11.abi
92+
2.1.30+xpu
93+
[0]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
94+
[1]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu', driver_version='1.3.27642', has_fp64=1, total_memory=65536MB, max_compute_units=448, gpu_eu_count=448)
9095
```
91-
2.1.0a0+cxx11.abi
92-
2.1.10+xpu
93-
[0]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
94-
[1]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
95-
[2]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
96-
[3]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
97-
[4]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
98-
[5]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
99-
[6]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
100-
[7]: _DeviceProperties(name='Intel(R) Data Center GPU Max 1550', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=65536MB, max_compute_units=512, gpu_eu_count=512)
101-
```
96+
10297
#### Running your own script
10398

10499
Now you are inside container with Python 3.10, PyTorch, and Intel® Extension for PyTorch\* preinstalled. You can run your own script

docker/build.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
#!/bin/bash
22

3-
if [[ ${IMAGE_NAME} != "" ]]; then
3+
if [[ ${IMAGE_TYPE} = "xpu" ]]; then
4+
IMAGE_NAME=intel/intel-extension-for-pytorch:2.1.30-$IMAGE_TYPE
45
docker build --build-arg http_proxy=$http_proxy \
56
--build-arg https_proxy=$https_proxy \
67
--build-arg no_proxy=" " \
78
--build-arg NO_PROXY=" " \
8-
--build-arg UNAME=ubuntu \
9-
--build-arg GID=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,') \
109
--build-arg UBUNTU_VERSION=22.04 \
1110
--build-arg PYTHON=python3.10 \
12-
--build-arg ICD_VER=23.30.26918.50-736~22.04 \
13-
--build-arg LEVEL_ZERO_GPU_VER=1.3.26918.50-736~22.04 \
14-
--build-arg LEVEL_ZERO_VER=1.13.1-719~22.04 \
15-
--build-arg LEVEL_ZERO_DEV_VER=1.13.1-719~22.04 \
16-
--build-arg DPCPP_VER=2024.0.0-49819 \
17-
--build-arg MKL_VER=2024.0.0-49656 \
18-
--build-arg TORCH_VERSION=2.1.0a0+cxx11.abi \
19-
--build-arg IPEX_VERSION=2.1.10+xpu \
20-
--build-arg TORCHVISION_VERSION=0.16.0a0+cxx11.abi \
21-
--build-arg TORCHAUDIO_VERSION=2.1.0a0+cxx11.abi \
11+
--build-arg ICD_VER=23.43.27642.40-803~22.04 \
12+
--build-arg LEVEL_ZERO_GPU_VER=1.3.27642.40-803~22.04 \
13+
--build-arg LEVEL_ZERO_VER=1.14.0-744~22.04 \
14+
--build-arg LEVEL_ZERO_DEV_VER=1.14.0-744~22.04 \
15+
--build-arg DPCPP_VER=2024.1.0-963 \
16+
--build-arg MKL_VER=2024.1.0-691 \
17+
--build-arg CCL_VER=2021.12.0-309 \
18+
--build-arg TORCH_VERSION=2.1.0.post2+cxx11.abi \
19+
--build-arg IPEX_VERSION=2.1.30+xpu \
20+
--build-arg TORCHVISION_VERSION=0.16.0.post2+cxx11.abi \
21+
--build-arg TORCHAUDIO_VERSION=2.1.0.post2+cxx11.abi \
22+
--build-arg ONECCL_BIND_PT_VERSION=2.1.0+gpu \
2223
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2324
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2425
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2526
--build-arg TORCHAUDIO_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
26-
--build-arg CCL_VER=2021.11.1-6 \
27-
--build-arg ONECCL_BIND_PT_VERSION=2.1.100 \
2827
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2928
-t ${IMAGE_NAME} \
3029
-f Dockerfile.prebuilt .

0 commit comments

Comments
 (0)