Skip to content

Commit 8d5d715

Browse files
authored
2.1.20+xpu docker update (#3887)
* prepare docker with release candidate wheels. * remove copy * add IMAGE_TYPE * Update README.md * change build names
1 parent d3b9bee commit 8d5d715

File tree

3 files changed

+39
-51
lines changed

3 files changed

+39
-51
lines changed

docker/Dockerfile.prebuilt

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ ARG DEBIAN_FRONTEND=noninteractive
2222

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

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

4545
ARG ICD_VER
@@ -56,7 +56,7 @@ RUN apt-get update && \
5656
apt-get clean && \
5757
rm -rf /var/lib/apt/lists/*
5858

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

6868
RUN apt-get update && \
6969
apt-get install -y --no-install-recommends --fix-missing \
70-
intel-oneapi-runtime-dpcpp-cpp=${DPCPP_VER} \
71-
intel-oneapi-runtime-mkl=${MKL_VER} \
72-
intel-oneapi-runtime-ccl=${CCL_VER}
70+
intel-oneapi-runtime-dpcpp-cpp=${DPCPP_VER} \
71+
intel-oneapi-runtime-mkl=${MKL_VER} \
72+
intel-oneapi-runtime-ccl=${CCL_VER} && \
73+
apt-get clean && \
74+
rm -rf /var/lib/apt/lists/*
7375

7476
ARG PYTHON
7577
RUN apt-get update && apt install -y software-properties-common
@@ -112,16 +114,3 @@ RUN python -m pip install torch==${TORCH_VERSION} --extra-index-url ${TORCH_WHL_
112114
python -m pip install oneccl_bind_pt==${ONECCL_BIND_PT_VERSION} --extra-index-url ${ONECCL_BIND_PT_WHL_URL}
113115

114116
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64:$LD_LIBRARY_PATH
115-
116-
ARG UNAME
117-
ARG GID
118-
ARG GNAME=render
119-
ARG VNAME=video
120-
121-
RUN useradd -m -s /bin/bash $UNAME
122-
123-
RUN groupadd -g $GID $GNAME
124-
125-
RUN usermod -a -G $VNAME,$GNAME $UNAME
126-
127-
USER $UNAME

docker/README.md

Lines changed: 6 additions & 6 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.20-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.20-xpu
4747
```
4848
```bash
4949
docker run --rm \
@@ -88,8 +88,8 @@ python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch
8888

8989
Sample output looks like below:
9090
```
91-
2.1.0a0+cxx11.abi
92-
2.1.10+xpu
91+
2.1.0.post0+cxx11.abi
92+
2.1.20+xpu
9393
[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)
9494
[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)
9595
[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)

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.20-$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-958 \
16+
--build-arg MKL_VER=2024.1.0-688 \
17+
--build-arg CCL_VER=2021.12.0-307 \
18+
--build-arg TORCH_VERSION=2.1.0.post0+cxx11.abi \
19+
--build-arg IPEX_VERSION=2.1.20+xpu \
20+
--build-arg TORCHVISION_VERSION=0.16.0.post0+cxx11.abi \
21+
--build-arg TORCHAUDIO_VERSION=2.1.0.post0+cxx11.abi \
22+
--build-arg ONECCL_BIND_PT_VERSION=2.1.200 \
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)