Skip to content

Commit a1f970e

Browse files
authored
ipex 2.1.10+xpu docker support (#3519)
* add docker support
1 parent c8328b7 commit a1f970e

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

docker/Dockerfile.prebuilt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ RUN apt-get update && \
3737
apt-get clean && \
3838
rm -rf /var/lib/apt/lists/*
3939

40-
RUN no_proxy=$no_proxy wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | \
40+
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/graphics/ubuntu jammy max" | \
43-
tee /etc/apt/sources.list.d/intel.gpu.jammy.list
42+
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \
43+
tee /etc/apt/sources.list.d/intel-gpu-jammy.list
4444

4545
ARG ICD_VER
4646
ARG LEVEL_ZERO_GPU_VER
@@ -110,10 +110,15 @@ RUN python -m pip install torch==${TORCH_VERSION} --extra-index-url ${TORCH_WHL_
110110

111111
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64:$LD_LIBRARY_PATH
112112

113-
RUN apt update && \
114-
apt install -y sudo
115-
RUN adduser --disabled-password --gecos "" user
116-
RUN echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
113+
ARG UNAME
114+
ARG GID
115+
ARG GNAME=render
116+
ARG VNAME=video
117117

118-
# Set the non-root user as the default user
119-
USER user
118+
RUN useradd -m -s /bin/bash $UNAME
119+
120+
RUN groupadd -g $GID $GNAME
121+
122+
RUN usermod -a -G $VNAME,$GNAME $UNAME
123+
124+
USER $UNAME

docker/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,8 @@ IMAGE_NAME=intel/intel-extension-for-pytorch:xpu
4545
```
4646
```bash
4747

48-
VIDEO=$(getent group video | sed -E 's,^video:[^:]*:([^:]*):.*$,\1,')
49-
RENDER=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,')
50-
51-
test -z "$RENDER" || RENDER_GROUP="--group-add ${RENDER}"
52-
5348
docker run --rm \
5449
-v <your-local-dir>:/workspace \
55-
--group-add ${VIDEO} \
56-
${RENDER_GROUP} \
5750
--device=/dev/dri \
5851
--ipc=host \
5952
-e http_proxy=$http_proxy \

docker/build.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@
33
if [[ ${IMAGE_NAME} != "" ]]; then
44
docker build --build-arg http_proxy=$http_proxy \
55
--build-arg https_proxy=$https_proxy \
6-
--build-arg no_proxy=$no_proxy \
6+
--build-arg no_proxy=" " \
7+
--build-arg NO_PROXY=" " \
8+
--build-arg UNAME=ubuntu \
9+
--build-arg GID=$(getent group render | sed -E 's,^render:[^:]*:([^:]*):.*$,\1,') \
710
--build-arg UBUNTU_VERSION=22.04 \
811
--build-arg PYTHON=python3.10 \
9-
--build-arg ICD_VER=23.17.26241.33-647~22.04 \
10-
--build-arg LEVEL_ZERO_GPU_VER=1.3.26241.33-647~22.04 \
11-
--build-arg LEVEL_ZERO_VER=1.11.0-647~22.04 \
12-
--build-arg LEVEL_ZERO_DEV_VER=1.11.0-647~22.04 \
13-
--build-arg DPCPP_VER=2023.2.1-16 \
14-
--build-arg MKL_VER=2023.2.0-49495 \
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 \
1518
--build-arg TORCH_VERSION=2.0.1a0+cxx11.abi \
1619
--build-arg IPEX_VERSION=2.0.110+xpu \
1720
--build-arg TORCHVISION_VERSION=0.15.2a0+cxx11.abi \
1821
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
1922
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2023
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
21-
--build-arg CCL_VER=2021.10.0-49084 \
22-
--build-arg ONECCL_BIND_PT_VERSION=2.0.100 \
24+
--build-arg CCL_VER=2021.11.0-49156 \
25+
--build-arg ONECCL_BIND_PT_VERSION=2.1.100 \
2326
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
2427
-t ${IMAGE_NAME} \
2528
-f Dockerfile.prebuilt .

0 commit comments

Comments
 (0)