diff --git a/docker/Dockerfile.ci_cpu b/docker/Dockerfile.ci_cpu index 1ca592f34ab2..4c6a05c34117 100644 --- a/docker/Dockerfile.ci_cpu +++ b/docker/Dockerfile.ci_cpu @@ -87,9 +87,9 @@ RUN bash /install/ubuntu_install_tflite.sh COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh RUN bash /install/ubuntu_install_tensorflow.sh -# Arm(R) Compute Library -COPY install/ubuntu_install_arm_compute_lib.sh /install/ubuntu_install_arm_compute_lib.sh -RUN bash /install/ubuntu_install_arm_compute_lib.sh +# Compute Library +COPY install/ubuntu_download_arm_compute_lib_binaries.sh /install/ubuntu_download_arm_compute_lib_binaries.sh +RUN bash /install/ubuntu_download_arm_compute_lib_binaries.sh # Caffe deps COPY install/ubuntu_install_caffe.sh /install/ubuntu_install_caffe.sh diff --git a/docker/install/ubuntu_install_arm_compute_lib.sh b/docker/install/ubuntu_download_arm_compute_lib_binaries.sh similarity index 53% rename from docker/install/ubuntu_install_arm_compute_lib.sh rename to docker/install/ubuntu_download_arm_compute_lib_binaries.sh index c09bb1290a63..ff8ad0eb9073 100755 --- a/docker/install/ubuntu_install_arm_compute_lib.sh +++ b/docker/install/ubuntu_download_arm_compute_lib_binaries.sh @@ -17,62 +17,46 @@ # under the License. set -e -set -u -set -o pipefail - -repo_url="https://github.com/ARM-software/ComputeLibrary.git" -repo_dir="acl" -install_path="/opt/$repo_dir" -architecture_type=$(uname -i) -target_arch="arm64-v8a" # arm64-v8a / arm64-v8.2-a / armv7a -build_type="native" - -tmpdir=$(mktemp -d) - -cleanup() -{ - rm -rf "$tmpdir" -} - -trap cleanup 0 - -apt-get update && \ -apt-get install -y --no-install-recommends \ - git \ - scons \ - bsdmainutils \ - build-essential # Install cross-compiler when not building natively. # Depending on the architecture selected to compile for, # you may need to install an alternative cross-compiler. if [ "$architecture_type" != "aarch64" ]; then - apt-get install -y --no-install-recommends \ + apt-get update && apt-get install -y --no-install-recommends \ g++-aarch64-linux-gnu \ gcc-aarch64-linux-gnu fi -cd "$tmpdir" +compute_lib_version="v21.05" +compute_lib_base_url="https://github.com/ARM-software/ComputeLibrary/releases/download/${compute_lib_version}" +compute_lib_file_name="arm_compute-${compute_lib_version}-bin-linux.tar.gz" +compute_lib_download_url="${compute_lib_base_url}/${compute_lib_file_name}" -git clone "$repo_url" "$repo_dir" +target_lib="linux-arm64-v8a-neon" -cd "$repo_dir" +# uncomment line below if you need asserts/debug version of the library +# target_lib="${target_lib}-asserts" -# pin version to v21.02 -git checkout "v21.02" +extract_dir="arm_compute-${compute_lib_version}-bin-linux" +install_path="/opt/arm/acl" -if [ "$architecture_type" != "aarch64" ]; then - build_type="cross_compile" -fi +tmpdir=$(mktemp -d) + +cleanup() +{ + rm -rf "$tmpdir" +} + +trap cleanup 0 + +cd "$tmpdir" + +curl -sL "${compute_lib_download_url}" -o "${compute_lib_file_name}" +tar xzf "${compute_lib_file_name}" -scons \ - install_dir="$install_path" \ - Werror=1 \ - -j8 \ - debug=0 \ - asserts=0 \ - neon=1 \ - opencl=0 \ - os=linux \ - arch="$target_arch" \ - build="$build_type" +mkdir -p "${install_path}" +cp -r "${extract_dir}/include" "${install_path}/" +cp -r "${extract_dir}/arm_compute" "${install_path}/include/" +cp -r "${extract_dir}/support" "${install_path}/include/" +cp -r "${extract_dir}/utils" "${install_path}/include/" +cp -r "${extract_dir}/lib/${target_lib}" "${install_path}/lib"