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

Raspberry Pi OS can not install onnxruntime-genai #672

Closed
pxz2016 opened this issue Jul 3, 2024 · 5 comments
Closed

Raspberry Pi OS can not install onnxruntime-genai #672

pxz2016 opened this issue Jul 3, 2024 · 5 comments
Assignees

Comments

@pxz2016
Copy link

pxz2016 commented Jul 3, 2024

pip install onnxruntime-genai --pre
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement onnxruntime-genai (from versions: none)
ERROR: No matching distribution found for onnxruntime-genai

@natke
Copy link
Contributor

natke commented Jul 3, 2024

We do not have packages for raspberry pi yet. Can you give us more details about your use case?

If you would like to get going before we publish packages you can build from source and install the whl manually: https://onnxruntime.ai/docs/genai/howto/build-from-source.html

@natke natke self-assigned this Jul 3, 2024
@natke
Copy link
Contributor

natke commented Jul 5, 2024

Hi @pxz2016, is building from source an option for you?

@pxz2016
Copy link
Author

pxz2016 commented Jul 9, 2024

@natke build from source error:

~/onnxruntime-genai $ python build.py
2024-07-09 12:13:36,173 util.run [INFO] - Running subprocess in '/home/admin/onnxruntime-genai'
/opt/cmake/bin/cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -S /home/admin/onnxruntime-genai -B /home/admin/onnxruntime-genai/build/Linux/RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DUSE_CUDA=OFF -DUSE_ROCM=OFF -DUSE_DML=OFF -DENABLE_JAVA=OFF -DBUILD_WHEEL=ON
Loading Dependencies URLs ...
Loading Dependencies ...
CMake Warning (dev) at /opt/cmake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(pybind11_project) is deprecated, call
FetchContent_MakeAvailable(pybind11_project) instead. Policy CMP0169 can
be set to OLD to allow FetchContent_Populate(pybind11_project) to be called
directly for now, but the ability to call it with declared details will be
removed completely in a future version.
Call Stack (most recent call first):
cmake/external/helper_functions.cmake:139 (FetchContent_Populate)
cmake/external/onnxruntime_external_deps.cmake:29 (onnxruntime_fetchcontent_makeavailable)
CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at build/Linux/RelWithDebInfo/_deps/pybind11_project-src/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- pybind11 v2.10.1
CMake Warning (dev) at build/Linux/RelWithDebInfo/_deps/pybind11_project-src/tools/FindPythonLibsNew.cmake:98 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
build/Linux/RelWithDebInfo/_deps/pybind11_project-src/tools/pybind11Tools.cmake:50 (find_package)
build/Linux/RelWithDebInfo/_deps/pybind11_project-src/tools/pybind11Common.cmake:180 (include)
build/Linux/RelWithDebInfo/_deps/pybind11_project-src/CMakeLists.txt:206 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/cmake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(googletest) is deprecated, call
FetchContent_MakeAvailable(googletest) instead. Policy CMP0169 can be set
to OLD to allow FetchContent_Populate(googletest) to be called directly for
now, but the ability to call it with declared details will be removed
completely in a future version.
Call Stack (most recent call first):
cmake/external/helper_functions.cmake:139 (FetchContent_Populate)
cmake/external/onnxruntime_external_deps.cmake:45 (onnxruntime_fetchcontent_makeavailable)
CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /opt/cmake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(onnxruntime_extensions) is deprecated, call
FetchContent_MakeAvailable(onnxruntime_extensions) instead. Policy CMP0169
can be set to OLD to allow FetchContent_Populate(onnxruntime_extensions) to
be called directly for now, but the ability to call it with declared
details will be removed completely in a future version.
Call Stack (most recent call first):
cmake/external/helper_functions.cmake:139 (FetchContent_Populate)
cmake/external/onnxruntime_external_deps.cmake:89 (onnxruntime_fetchcontent_makeavailable)
CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at build/Linux/RelWithDebInfo/_deps/onnxruntime_extensions-src/CMakeLists.txt:41 (cmake_policy):
cmake_policy given unknown first argument "CMP0169"

-- CMAKE_SYSTEM_PROCESSOR=aarch64
-- CMAKE_GENERATOR_PLATFORM=
-- ONNX Runtime URL: https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-aarch64-1.17.1.tgz
CMake Warning (dev) at /opt/cmake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(GSL) is deprecated, call
FetchContent_MakeAvailable(GSL) instead. Policy CMP0169 can be set to OLD
to allow FetchContent_Populate(GSL) to be called directly for now, but the
ability to call it with declared details will be removed completely in a
future version.
Call Stack (most recent call first):
build/Linux/RelWithDebInfo/_deps/onnxruntime_extensions-src/cmake/externals/gsl.cmake:20 (FetchContent_Populate)
build/Linux/RelWithDebInfo/_deps/onnxruntime_extensions-src/CMakeLists.txt:297 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Fetch opencv
-- Detected processor: aarch64
-- Looking for ccache - not found
-- libjpeg-turbo: VERSION = 2.1.0, BUILD = opencv-4.5.4-libjpeg-turbo
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- OpenCV Python: during development append to PYTHONPATH: /home/admin/onnxruntime-genai/build/Linux/RelWithDebInfo/python_loader
-- Checking for module 'libdc1394-2'
-- Package 'libdc1394-2', required by 'virtual:world', not found
-- Allocator metrics storage type: 'int'
-- Excluding from source files list (optimization is disabled): modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list (optimization is disabled): modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list (optimization is disabled): modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list (optimization is disabled): modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list (optimization is disabled): modules/imgproc/src/resize.sse4_1.cpp

-- General configuration for OpenCV 4.5.4 =====================================
-- Version control: 4.5.4-dirty

-- Platform:
-- Timestamp: 2024-07-03T02:31:09Z
-- Host: Linux 6.6.31+rpt-rpi-2712 aarch64
-- CMake: 3.30.0
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/gmake
-- Configuration: RelWithDebInfo

-- CPU/HW features:
-- Baseline: NEON FP16

-- C/C++:
-- Built as dynamic libs?: NO
-- C++ standard: 17
-- C++ Compiler: /usr/bin/c++ (ver 12.2.0)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed
-- Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed
-- ccache: NO
-- Precompiled headers: NO
-- Extra dependencies: /usr/lib/aarch64-linux-gnu/libz.so dl m pthread rt
-- 3rdparty dependencies: libjpeg-turbo libpng

-- OpenCV modules:
-- To be built: core imgcodecs imgproc
-- Disabled: calib3d features2d flann highgui java_bindings_generator js_bindings_generator ml objc_bindings_generator objdetect photo python_bindings_generator python_tests stitching video videoio world
-- Disabled by dependency: -
-- Unavailable: dnn gapi java python2 python3 ts
-- Applications: -
-- Documentation: NO
-- Non-free algorithms: NO

-- GUI:
-- VTK support: NO

-- Media I/O:
-- ZLib: /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.13)
-- JPEG: build-libjpeg-turbo (ver 2.1.0-62)
-- PNG: build (ver 1.6.37)
-- HDR: NO
-- SUNRASTER: NO
-- PXM: NO
-- PFM: NO

-- Video I/O:
-- DC1394: NO

-- Parallel framework: none

-- Other third-party libraries:
-- Custom HAL: NO

-- Python (for build): NO

-- Install to: /usr/local


--
-- Fetch json
CMake Warning (dev) at /opt/cmake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(nlohmann_json) is deprecated, call
FetchContent_MakeAvailable(nlohmann_json) instead. Policy CMP0169 can be
set to OLD to allow FetchContent_Populate(nlohmann_json) to be called
directly for now, but the ability to call it with declared details will be
removed completely in a future version.
Call Stack (most recent call first):
build/Linux/RelWithDebInfo/_deps/onnxruntime_extensions-src/cmake/externals/json.cmake:9 (FetchContent_Populate)
build/Linux/RelWithDebInfo/_deps/onnxruntime_extensions-src/CMakeLists.txt:534 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Tokenizer needed.
Building onnxruntime-genai for version 0.4.0-dev
Test is using C++20
------------------Enabling tests------------------
Test is using C++20
------------------Enabling Python Wheel------------------
Test is using C++20
Setting up wheel files in : /home/admin/onnxruntime-genai/build/Linux/RelWithDebInfo/wheel
------------------Enabling model benchmark------------------
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/home/admin/onnxruntime-genai/build.py", line 568, in
update(arguments, environment)
File "/home/admin/onnxruntime-genai/build.py", line 507, in update
util.run(command, env=env)
File "/home/admin/onnxruntime-genai/tools/python/util/run.py", line 56, in run
completed_process = subprocess.run(
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/cmake/bin/cmake', '-G', 'Unix Makefiles', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-S', '/home/admin/onnxruntime-genai', '-B', '/home/admin/onnxruntime-genai/build/Linux/RelWithDebInfo', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DUSE_CUDA=OFF', '-DUSE_ROCM=OFF', '-DUSE_DML=OFF', '-DENABLE_JAVA=OFF', '-DBUILD_WHEEL=ON']' returned non-zero exit status 1.

@baijumeswani
Copy link
Contributor

Seems like you're using cmake 3.30. We recently submitted a fix to support building with cmake 3.30: #686.

Could you try building again from main: #686

@pxz2016
Copy link
Author

pxz2016 commented Jul 16, 2024

Seems like you're using cmake 3.30. We recently submitted a fix to support building with cmake 3.30: #686.

Could you try building again from main: #686

Successfully compiled after pulling the latest code. Thanks!

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

No branches or pull requests

3 participants