Android 无法使用ck framework安装TensorFlow Lite
我发现了一个使用TensorFlow Lite对图像进行分类的程序。我遵循提供的自述,但在为android23安装lib-tflite-1.7.0-src-static包时遇到了问题-ck framework找不到我的android ndk:Android 无法使用ck framework安装TensorFlow Lite,android,tensorflow,Android,Tensorflow,我发现了一个使用TensorFlow Lite对图像进行分类的程序。我遵循提供的自述,但在为android23安装lib-tflite-1.7.0-src-static包时遇到了问题-ck framework找不到我的android ndk: plam@mrk-23:~$ ck install package:lib-tflite-1.7.0-src-static --target_os=android23-arm64 -----------------------------------
plam@mrk-23:~$ ck install package:lib-tflite-1.7.0-src-static --target_os=android23-arm64
-----------------------------------
Resolving software dependencies ...
*** Dependency 1 = compiler (C++ compiler):
********
WARNING: no registered CK environment was found for "C++ compiler" dependency with tags="compiler,lang-cpp" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "target_os_uoa": "android23-arm64"}
Trying to automatically detect required software ...
1) Checking if "Android NDK GCC compiler" (compiler.gcc.android.ndk / bfc4274b1d8f83bb) is installed ...
Searching for Android NDK GCC compiler (ndk-build) to automatically register in the CK - it may take some time, please wait ...
* Searching in /usr ...
* Searching in /opt ...
* Searching in /home/plam ...
Search completed in 2.1 secs. Found 0 target files (may be pruned) ...
(warning during intermediate step: software was not automatically found on your system! Please, install it and re-try again!)
2) Checking if "Android NDK LLVM compiler" (compiler.llvm.android.ndk / 47b0a9cd88368dc6) is installed ...
-----------------------------------
Resolving software dependencies ...
*** Dependency 1 = ndk-gcc (Android NDK GCC):
********
WARNING: no registered CK environment was found for "Android NDK GCC" dependency with tags="compiler,gcc,ndk" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "target_os_uoa": "android23-arm64"}
Trying to automatically detect required software ...
1) Checking if "Android NDK GCC compiler" (compiler.gcc.android.ndk / bfc4274b1d8f83bb) is installed ...
Searching for Android NDK GCC compiler (ndk-build) to automatically register in the CK - it may take some time, please wait ...
* Searching in /usr ...
* Searching in /opt ...
* Searching in /home/plam ...
Search completed in 2.1 secs. Found 0 target files (may be pruned) ...
(warning during intermediate step: software was not automatically found on your system! Please, install it and re-try again!)
No software auto-detection scripts found for this software in CK :( ...
Checked following related CK soft entries:
* compiler.gcc.android.ndk
Searching and installing CK software packages ...
* tags: compiler,gcc,ndk
* or tags:
* no tags:
CK packages are not found for this software :( !
****** Installation notes: ******
You can download and install Native Android NDK for your platform from
* http://developer.android.com/ndk/downloads/index.html
You can also download CrystaX NDK (extra libs and improved C++ support) from
* https://www.crystax.net/en/download
*********************************
Would you like to manually register software, i.e. if it is in an unusual path (y/N):
(warning during intermediate step: no registered CK environment was found for "Android NDK GCC" dependency with tags="compiler,gcc,ndk" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "target_os_uoa": "android23-arm64"})
No software auto-detection scripts found for this software in CK :( ...
Checked following related CK soft entries:
* compiler.gcc.milepost
* compiler.icc
* compiler.ctuning-cc
* compiler.microsoft
* compiler.open64
* compiler.gcc
* compiler.gcc.android.ndk
* compiler.llvm
* compiler.llvm.android.ndk
* compiler.pgi
Searching and installing CK software packages ...
* tags: compiler,lang-cpp
* or tags:
* no tags:
CK packages are not found for this software :( !
Would you like to open wiki pages about related software (with possible installation info) (y/N):
CK error: [package] no registered CK environment was found for "C++ compiler" dependency with tags="compiler,lang-cpp" and setup={"target_os_bits": "64", "host_os_uoa": "linux-64", "target_os_uoa": "android23-arm64"}!
我认为这是因为android ndk安装在集群中不常见的位置:/misc/android-ndk-r17b
有人知道如何告诉这个ck框架在非标准位置检测我的android ndk吗?我使用Ubuntu18.04并从他们的GitHub安装了ck
非常感谢 您必须首先帮助CK从Android NDK以不必要的路径检测GCC,如下所示:
$ ck detect soft:compiler.gcc.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
$ ck show env --target_os=android23-arm64
$ ck virtual env --tags=android,ndk,gcc --target_os=android23-arm64
$ ck install package:lib-tflite-1.7.0-src-static --target_os=android23-arm64
$ ck compile program:image-classification-tflite --target_os=android23-arm64 --speed
$ ck run program:image-classification-tflite --target_os=android23-arm64
$ ck detect soft:compiler.llvm.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
现在,您应该可以按如下方式重新启动TensorFlow的安装:
$ ck detect soft:compiler.gcc.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
$ ck show env --target_os=android23-arm64
$ ck virtual env --tags=android,ndk,gcc --target_os=android23-arm64
$ ck install package:lib-tflite-1.7.0-src-static --target_os=android23-arm64
$ ck compile program:image-classification-tflite --target_os=android23-arm64 --speed
$ ck run program:image-classification-tflite --target_os=android23-arm64
$ ck detect soft:compiler.llvm.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
您还可以通过类似的方式从Android NDK检测到叮当声,如下所示:
$ ck detect soft:compiler.gcc.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
$ ck show env --target_os=android23-arm64
$ ck virtual env --tags=android,ndk,gcc --target_os=android23-arm64
$ ck install package:lib-tflite-1.7.0-src-static --target_os=android23-arm64
$ ck compile program:image-classification-tflite --target_os=android23-arm64 --speed
$ ck run program:image-classification-tflite --target_os=android23-arm64
$ ck detect soft:compiler.llvm.android.ndk --target_os=android23-arm64 --search_dirs=<<INSTALLATION PATH OF ANDROID NDK>>
$ck detect soft:compiler.llvm.android.ndk--target\u os=android23-arm64--search\u dirs=
但我不确定它是否能与上面的tflite包一起使用-您可以尝试一下
如果需要,您可以在此处找到CK可以检测到的其他软件:
顺便说一句,我建议您在CK邮件列表或Slack频道中询问此类问题-您可能会更快地获得帮助:gfursin,谢谢您的详细回答,这对我很有用。