Open rafariossaa opened 2 years ago
Hi @rafariossaa Thanks for filing this issue, I'll look into it.
Hi @rafariossaa Here's how I got the wheel to build successfully and from there you can take it to any OS (Either Ubuntu or Debian) and install it.
FROM intel/intel-optimized-pytorch:1.10.0-conda as dev-base
ARG IPEX_BRANCH=v1.10.100
RUN USE_MKLDNN=ON && \
git clone --recursive https://github.com/intel/intel-extension-for-pytorch -b ${IPEX_BRANCH} && \
cd intel-extension-for-pytorch && \
pip install --no-cache-dir numpy torch==1.10.2+cpu -f https://download.pytorch.org/whl/torch_stable.html && \
python setup.py bdist_wheel && \
pip install dist/*1.10.100*.whl
RUN python -c "import torch; import intel_extension_for_pytorch as ipex; print('torch:', torch.__version__,' ipex:',ipex.__version__)"
and you should have this output when last RUN
command is executed:
torch: 1.10.2+cpu ipex: 1.10.100+cpu
and then in a multi-stage build environment, you can take this very same wheel under dist
and install it in your environment or Docker image of the choice.
I hope that helps.
Hi @ashahba , The thing here is not as much as to get a intel-extension package but as being able to compile it in debian 11.
As I can see intel/intel-optimized-pytorch:1.10.0-conda
is based on ubuntu 20.04 and it is using gcc 9.3, but in debian 11 gcc is at version 10.2.1.
$ docker run -it intel/intel-optimized-pytorch:1.10.0-conda bash
root@c24de7063da0:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
root@c24de7063da0:/# gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
$ docker run -it debian:11.3 bash
root@7104382938f4:/# apt-get update && apt-get install build-essential
...
root@7104382938f4:/# cat /etc/debian_version
11.3
root@7104382938f4:/# gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
I think this issue is originated in something in the code or the compilation of the dependencies. Were you able to reproduce the issue using debian 11 (gcc 10) ?
@rafariossaa let me get a fresh setup again with Debian 11 + GCC 10
and will update here.
Thanks.
@ashahba , will you submit a PR to IPEX 1.12 release branch to address this issue?
Hi, I am trying to compile this extension using debian 11. The compilation went well but in the linking stage I got the following error:
I compiled it inside a debian 11 container. To compile it I followed this steps:
I saw in pytorch issues the collect_env.py scripts was used to gather information: