File: Dockerfile.xpu

package info (click to toggle)
pytorch-geometric 2.6.1-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,904 kB
  • sloc: python: 127,155; sh: 338; cpp: 27; makefile: 18; javascript: 16
file content (31 lines) | stat: -rw-r--r-- 1,430 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ARG BASE_IMAGE="intel/intel-extension-for-pytorch"
ARG BASE_TAG="2.1.30-xpu"

FROM ${BASE_IMAGE}:${BASE_TAG}

# meta information
LABEL org.opencontainers.image.version = "2.3.1"
LABEL org.opencontainers.image.authors = "PyG authors"
LABEL org.opencontainers.image.source = "https://github.com/pyg-team/pytorch_geometric"
LABEL org.opencontainers.image.licenses = "MIT"
LABEL org.opencontainers.image.base.name=${BASE_IMAGE}:${BASE_TAG}

# Create a working directory
RUN mkdir /app
WORKDIR /app

# Add the XPU-related package repository for the LTS releases
RUN . /etc/os-release && \
    wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \
    sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu ${VERSION_CODENAME}/lts/2350 unified" | \
    sudo tee /etc/apt/sources.list.d/intel-gpu-${VERSION_CODENAME}.list

# Install oneCCL
RUN sudo apt update && apt install -y intel-oneapi-ccl-devel=2021.12.0-309 python3-dev cmake vim
RUN echo "source /opt/intel/oneapi/setvars.sh --force" >> /root/.bashrc

# Install PyG
RUN pip install ninja wheel ogb && pip install git+https://github.com/pyg-team/pyg-lib.git && \
    pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cpu.html && \
    pip install torch_geometric