openvino icon indicating copy to clipboard operation
openvino copied to clipboard

Added Alpine Linux dependencies to install list

Open blacklightpy opened this issue 1 year ago • 6 comments
trafficstars

Details:

  • Added Alpine Linux dependencies to install list

Tickets:

  • #24368

blacklightpy avatar May 09 '24 17:05 blacklightpy

I've tried in alpine docker image:

fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
  opencl-2023.04.17-r1:
    breaks: opencl-icd-loader-dev-2.3.2-r1[opencl-icd-loader=2.3.2-r1]
    satisfies: opencl-dev-2023.04.17-r1[opencl=2023.04.17-r1]
  opencl-dev-2023.04.17-r1:
    conflicts: opencl-icd-loader-dev-2.3.2-r1[pc:OpenCL=3.0]
    satisfies: world[opencl-dev]
  opencl-icd-loader-dev-2.3.2-r1:
    conflicts: opencl-dev-2023.04.17-r1[pc:OpenCL=3.0]
    satisfies: world[opencl-icd-loader-dev]
/openvino/install_build_dependencies.sh: line 279: snappy-dev: command not found
/openvino/install_build_dependencies.sh: line 281: py3-pip: command not found
/openvino/install_build_dependencies.sh: line 283: py3-virtualenv: command not found
/openvino/install_build_dependencies.sh: line 284: python3-dev: command not found
/openvino/install_build_dependencies.sh: line 285: py3-pybind11-dev: command not found
/openvino/install_build_dependencies.sh: line 286: libffi-dev: command not found
/openvino/install_build_dependencies.sh: line 288: py3-enchant: command not found
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.

Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
        [--post-data STR | --post-file FILE] [-Y on/off]
        [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

        --spider        Only check URL existence: $? is 0 if exists
        --header STR    Add STR (of form 'header: value') to headers
        --post-data STR Send STR using POST method
        --post-file FILE        Send FILE using POST method
        -c              Continue retrieval of aborted transfer
        -q              Quiet
        -P DIR          Save to DIR (default .)
        -S              Show server response
        -T SEC          Network read timeout is SEC seconds
        -O FILE         Save to FILE ('-' for stdout)
        -o LOGFILE      Log messages to FILE
        -U STR          Use STR for User-Agent header
        -Y on/off       Use proxy
/openvino/install_build_dependencies.sh: line 291: git-lfs: command not found
/openvino/install_build_dependencies.sh: line 293: flatbuffers-dev: command not found
/openvino/install_build_dependencies.sh: line 295: enchant2: command not found
/openvino/install_build_dependencies.sh: line 297: nlohmann-json: command not found
/openvino/install_build_dependencies.sh: line 310: --version: command not found
Connecting to proxy-dmz.intel.com:911 (10.102.248.16:911)
wget: error getting response: Invalid argument
chmod: cmake-3.26.0-linux-x86_64.sh: No such file or directory
/openvino/install_build_dependencies.sh: line 328: ./cmake-3.26.0-linux-x86_64.sh: No such file or directory

ilya-lavrenov avatar May 09 '24 18:05 ilya-lavrenov

Oops, I was sleepy and just finished it up hastily.

I'll do it again. Should've tested with the container first.

blacklightpy avatar May 10 '24 06:05 blacklightpy

So here is the condition, there is opencl, which is the Khronos official ICD Loader, and opencl-icd-loader, which is a free software ICD loader by OCL-dev/ocl-icd.

An ICD loader loads the OpenCL runtime (ICD). Here we have two loader implementations to choose from.

Differences

opencl-dev provides the pkg-config descriptors OpenCL, OpenCL-Headers and OpenCL-CLHPP, while opencl-icd-loader-dev only provides the descriptors OpenCL and ocl-icd.

In addition to the pkg-config files, opencl-dev also provides the CMake files (cmake/OpenCLHeaders/OpenCLHeaders*.cmake and cmake/OpenCLHeadersCpp/OpenCLHeadersCpp*.cmake)

We can install opencl-headers alongside opencl-icd-loader-dev, while opencl-dev depends on it.

If you install opencl-icd-loader-dev, you won't get the OpenCL-Headers or OpenCL-CLHPP pkg-config files, but you still have opencl-headers. It contains the headers and hpp files, save for the pkg-config files and CMake files.

Which one to choose 🤔

onednn-dev requires opencl-headers and opencl-icd-loader-dev. According to this post, OpenVINO also uses the ocl-icd (which is opencl-icd-loader-dev in Alpine Linux). But the thirdparty/ocl folder in this repo seems to be using the Khronos ICD Loader.

blacklightpy avatar May 10 '24 10:05 blacklightpy

I think what Alpine Linux should've done would've been to either package the OpenCL-CLHPP and OpenCL-Headers .pc files in opencl-headers package, and remove them from opencl-dev so that we could use either of them and have the pkg-config files.

In Void Linux, the ICD Loader is from OCL-dev/ocl-icd, but it works with Khronos OCL Headers.

blacklightpy avatar May 10 '24 10:05 blacklightpy

I suppose Khronos ICD Loader is the new and superior version, and OCL-dev only exists because older packages were built with it. I'll use that one.

blacklightpy avatar May 10 '24 12:05 blacklightpy

Ready @ilya-lavrenov

blacklightpy avatar May 10 '24 12:05 blacklightpy

Hi @blacklightpy Thank you! I've tested it locally and it works.

ilya-lavrenov avatar May 15 '24 10:05 ilya-lavrenov