Skip to content

Commit f4563dc

Browse files
authored
docker RC3 support (#3015)
* remove copy, change links * add py3.9 support * validate sanity w/ RC3 * add py310
1 parent 1016f10 commit f4563dc

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

docker/Dockerfile.xpu

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,14 @@ RUN if [ ${CCL_VER} != "N/A" ]; then \
8282
fi
8383

8484
ARG PYTHON
85+
RUN apt-get update && apt install -y software-properties-common
86+
RUN add-apt-repository -y ppa:deadsnakes/ppa
87+
88+
RUN apt-cache policy $PYTHON && apt-get update && apt-get install -y \
89+
--no-install-recommends --fix-missing $PYTHON
8590

8691
RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
87-
${PYTHON} lib${PYTHON} python3-pip && \
92+
${PYTHON} lib${PYTHON} python3-pip ${PYTHON}-distutils && \
8893
apt-get clean && \
8994
rm -rf /var/lib/apt/lists/*
9095

@@ -97,27 +102,23 @@ RUN ln -sf $(which ${PYTHON}) /usr/local/bin/python && \
97102
ln -sf $(which ${PYTHON}) /usr/bin/python && \
98103
ln -sf $(which ${PYTHON}) /usr/bin/python3
99104

100-
COPY whls /tmp/whls
101-
102-
RUN python -m pip install /tmp/whls/*
103-
104-
# ARG TORCH_VERSION
105-
# ARG TORCHVISION_VERSION
106-
# ARG IPEX_VERSION
107-
# ARG ONECCL_BIND_PT_VERSION="N/A"
108-
# ARG TORCH_WHL_URL
109-
# ARG IPEX_WHL_URL
110-
# ARG TORCHVISION_WHL_URL
111-
# ARG ONECCL_BIND_PT_WHL_URL="N/A"
112-
113-
# RUN python -m pip install numpy
114-
115-
# RUN python -m pip install torch==${TORCH_VERSION} -f ${TORCH_WHL_URL} && \
116-
# python -m pip install intel_extension_for_pytorch==${IPEX_VERSION} -f ${IPEX_WHL_URL} && \
117-
# python -m pip install torchvision==${TORCHVISION_VERSION} -f ${TORCHVISION_WHL_URL}
118-
# RUN if [ ${ONECCL_BIND_PT_VERSION} != "N/A" ] && [ ${ONECCL_BIND_PT_WHL_URL} != "N/A" ]; then \
119-
# python -m pip install oneccl_bind_pt==${ONECCL_BIND_PT_VERSION} -f ${ONECCL_BIND_PT_WHL_URL}; \
120-
# fi
105+
ARG TORCH_VERSION
106+
ARG TORCHVISION_VERSION
107+
ARG IPEX_VERSION
108+
ARG ONECCL_BIND_PT_VERSION="N/A"
109+
ARG TORCH_WHL_URL
110+
ARG IPEX_WHL_URL
111+
ARG TORCHVISION_WHL_URL
112+
ARG ONECCL_BIND_PT_WHL_URL="N/A"
113+
114+
RUN python -m pip install numpy
115+
116+
RUN python -m pip install torch==${TORCH_VERSION} -f ${TORCH_WHL_URL} && \
117+
python -m pip install intel_extension_for_pytorch==${IPEX_VERSION} -f ${IPEX_WHL_URL} && \
118+
python -m pip install torchvision==${TORCHVISION_VERSION} -f ${TORCHVISION_WHL_URL}
119+
RUN if [ ${ONECCL_BIND_PT_VERSION} != "N/A" ] && [ ${ONECCL_BIND_PT_WHL_URL} != "N/A" ]; then \
120+
python -m pip install oneccl_bind_pt==${ONECCL_BIND_PT_VERSION} -f ${ONECCL_BIND_PT_WHL_URL}; \
121+
fi
121122

122123

123124
ENV LD_LIBRARY_PATH=/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64:$LD_LIBRARY_PATH

0 commit comments

Comments
 (0)