Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for Intel ResNet50 Docker Container Failing #12

Closed
alex-minooka opened this issue Dec 12, 2023 · 2 comments
Closed

Build for Intel ResNet50 Docker Container Failing #12

alex-minooka opened this issue Dec 12, 2023 · 2 comments

Comments

@alex-minooka
Copy link

alex-minooka commented Dec 12, 2023

When running:
bash build_resnet50_contanier.sh

Container fails to build causing the resulting output:

327.9 Cloning into 'mlperf_inference'...
367.0 Already on 'master'
367.0 Your branch is up to date with 'origin/master'.
367.0 error: pathspec 'third_party/pybind/' did not match any file(s) known to git
------
Dockerfile:73
--------------------
  72 |     ARG VISION_VERSION=8e078971b8aebdeb1746fea58851e3754f103053
  73 | >>> RUN source /opt/rh/gcc-toolset-11/enable && \
  74 | >>>     cd code/retinanet/pytorch-cpu && mkdir retinanet-env && cd retinanet-env && \
  75 | >>>     git clone https://github.com/pytorch/vision && \
  76 | >>>     cd vision && git checkout ${VISION_VERSION} && python setup.py install && cd .. && \
  77 | >>>     git clone https://github.com/intel/intel-extension-for-pytorch.git ipex-cpu-dev && \
  78 | >>>     cd ipex-cpu-dev && git checkout ${IPEX_VERSION} && \
  79 | >>>     git submodule sync && git submodule update --init --recursive && \
  80 | >>>     git apply /opt/workdir/code/retinanet/pytorch-cpu/runtime_ignore_dequant_check.patch && \
  81 | >>>     python setup.py install && \
  82 | >>>     export IPEX_PATH=${PWD}/build/Release/packages/intel_extension_for_pytorch && cd .. && \
  83 | >>>     git clone https://github.com/mlcommons/inference.git mlperf_inference && \
  84 | >>>     cd mlperf_inference && git checkout ${INFERENCE} && git submodule update --init --recursive third_party/pybind/ && cp mlperf.conf ../../mlperf.conf && \
  85 | >>>     cd loadgen && mkdir build && cd build && cmake .. && make && cd .. && \
  86 | >>>     CFLAGS="-std=c++14" python setup.py install && export LOADGEN_DIR=${PWD} && cd ../.. && \
  87 | >>>     git clone https://github.com/opencv/opencv.git && cd opencv && git checkout 4.x && \
  88 | >>>     mkdir build && cd build && cmake -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF -DBUILD_LIST=highgui,imgcodecs,imgproc .. && make -j$(nproc) && \
  89 | >>>     export OPENCV_DIR=${PWD} && cd ../.. && \
  90 | >>>     git clone https://github.com/Tencent/rapidjson.git && cd rapidjson && git checkout e4bde977 && \
  91 | >>>     export RAPIDJSON_INCLUDE_DIR=${PWD}/include && cd .. && \
  92 | >>>     git clone https://github.com/gflags/gflags.git && cd gflags && git checkout a738fdf93 && mkdir build && cd build && \
  93 | >>>     cmake .. && make && export GFLAGS_DIR=${PWD} && cd ../.. && \
  94 | >>>     export LD_LIBRARY_PATH=${OPENCV_DIR}/lib:${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH} && \
  95 | >>>     export LIBRARY_PATH=${CONDA_PREFIX}/lib:${LIBRARY_PATH} && \
  96 | >>>     rm -rf /opt/conda/lib/cmake/mkl && \
  97 | >>>     export TORCH_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` && \
  98 | >>>     cd .. && \
  99 | >>>     cmake -DCMAKE_PREFIX_PATH=${TORCH_PATH} \
 100 | >>>         -DLOADGEN_DIR=${LOADGEN_DIR} \
 101 | >>>         -DOpenCV_DIR=${OPENCV_DIR} \
 102 | >>>         -DRapidJSON_INCLUDE_DIR=${RAPIDJSON_INCLUDE_DIR} \
 103 | >>>         -Dgflags_DIR=${GFLAGS_DIR} \
 104 | >>>         -DINTEL_EXTENSION_FOR_PYTORCH_PATH=${IPEX_PATH} \
 105 | >>>         -B${PWD}/build \
 106 | >>>         -H${PWD}/src && \
 107 | >>>     cmake --build ${PWD}/build --config Release
 108 |
--------------------
ERROR: failed to solve: process "/bin/sh -c source /opt/rh/gcc-toolset-11/enable &&     cd code/retinanet/pytorch-cpu && mkdir retinanet-env && cd retinanet-env &&     git clone https://github.com/pytorch/vision &&     cd vision && git checkout ${VISION_VERSION} && python setup.py install && cd .. &&     git clone https://github.com/intel/intel-extension-for-pytorch.git ipex-cpu-dev &&     cd ipex-cpu-dev && git checkout ${IPEX_VERSION} &&     git submodule sync && git submodule update --init --recursive &&     git apply /opt/workdir/code/retinanet/pytorch-cpu/runtime_ignore_dequant_check.patch &&     python setup.py install &&     export IPEX_PATH=${PWD}/build/Release/packages/intel_extension_for_pytorch && cd .. &&     git clone https://github.com/mlcommons/inference.git mlperf_inference &&     cd mlperf_inference && git checkout ${INFERENCE} && git submodule update --init --recursive third_party/pybind/ && cp mlperf.conf ../../mlperf.conf &&     cd loadgen && mkdir build && cd build && cmake .. && make && cd .. &&     CFLAGS=\"-std=c++14\" python setup.py install && export LOADGEN_DIR=${PWD} && cd ../.. &&     git clone https://github.com/opencv/opencv.git && cd opencv && git checkout 4.x &&     mkdir build && cd build && cmake -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF -DBUILD_LIST=highgui,imgcodecs,imgproc .. && make -j$(nproc) &&     export OPENCV_DIR=${PWD} && cd ../.. &&     git clone https://github.com/Tencent/rapidjson.git && cd rapidjson && git checkout e4bde977 &&     export RAPIDJSON_INCLUDE_DIR=${PWD}/include && cd .. &&     git clone https://github.com/gflags/gflags.git && cd gflags && git checkout a738fdf93 && mkdir build && cd build &&     cmake .. && make && export GFLAGS_DIR=${PWD} && cd ../.. &&     export LD_LIBRARY_PATH=${OPENCV_DIR}/lib:${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH} &&     export LIBRARY_PATH=${CONDA_PREFIX}/lib:${LIBRARY_PATH} &&     rm -rf /opt/conda/lib/cmake/mkl &&     export TORCH_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` &&     cd .. &&     cmake -DCMAKE_PREFIX_PATH=${TORCH_PATH}         -DLOADGEN_DIR=${LOADGEN_DIR}         -DOpenCV_DIR=${OPENCV_DIR}         -DRapidJSON_INCLUDE_DIR=${RAPIDJSON_INCLUDE_DIR}         -Dgflags_DIR=${GFLAGS_DIR}         -DINTEL_EXTENSION_FOR_PYTORCH_PATH=${IPEX_PATH}         -B${PWD}/build         -H${PWD}/src &&     cmake --build ${PWD}/build --config Release" did not complete successfully: exit code: 1

Is this a known issue and is there a work around?
Device is Sapphire Rapids

@gktejus
Copy link

gktejus commented Dec 13, 2023

@alex-minooka, this is probably because they decided to remove the pybind11 submodule (see: mlcommons/inference@0f71999) but forgot to update it in the Dockerfiles (and everywhere else). My workaround for this has been to replace

git submodule update --init --recursive third_party/pybind/ && \

in the Dockerfile to

pip install pybind11 && \

@alex-minooka
Copy link
Author

This work around worked for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants