{"id":340331,"date":"2022-10-27T15:00:38","date_gmt":"2022-10-27T15:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340331"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340331","title":{"rendered":"<span>\u041d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0430 RISC-V \u0441 Movidius Neural Compute Stick<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>RISC-V \u2014 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0430\u044f royalty \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0435\u043b\u0435\u0437\u0430 \u043d\u0430 \u0435\u0451 \u043e\u0441\u043d\u043e\u0432\u0435. \u041d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 RISC-V \u0440\u0430\u0441\u0442\u0451\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0451 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0436\u0435\u043b\u0435\u0437\u0435 \u0438 \u0441\u043e\u0444\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e CPU \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0441 \u043d\u0438\u043c Linux \u044f\u0434\u0440\u043e \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0445\u043e\u0442\u044f RVV 0.7.1 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0438 RVV 1.0 \u0432\u043e\u0442-\u0432\u043e\u0442 \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442. \u0412 \u043d\u0430\u0448\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0442\u0440\u0443\u0434\u043e\u0435\u043c\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a OpenVINO \u0438 OpenCV \u043d\u0430 RISC-V \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0426\u0435\u043b\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u2014 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f RISC-V CPU \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u043c Intel Movidius Neural Compute Stick 2 (NCS2). \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u043e\u0434 RISC-V. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043d\u043e \u043c\u044b \u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u0441\u0435 \u043e\u043d\u0438 \u0441\u043f\u0440\u044f\u0447\u0443\u0442\u0441\u044f \u043f\u043e\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 CI\/CD, \u043a\u0430\u043a \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0431\u044b\u043b\u043e \u0441 ARM-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c17\/718\/cc9\/c17718cc9ecd7003fe0ce819948a3893.jpg\" width=\"811\" height=\"584\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c17\/718\/cc9\/c17718cc9ecd7003fe0ce819948a3893.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0447\u0435\u0440\u0435\u0437 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 QEMU \u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 <a href=\"https:\/\/mangopi.org\/mqpro\"><u>MangoPi MQ-Pro<\/u><\/a>. \u041d\u0430 QEMU \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"http:\/\/old-releases.ubuntu.com\/releases\/focal\/\"><u>\u043e\u0431\u0440\u0430\u0437<\/u><\/a> Ubuntu 20.04 \u0434\u043b\u044f RISC-V, \u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 MangoPi \u2014 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e Ubuntu 22.04 \u0434\u043b\u044f AllWinner Nezha (<a href=\"https:\/\/ubuntu.com\/download\/risc-v\"><u>\u0441\u0441\u044b\u043b\u043a\u0430<\/u><\/a>).<\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e MangoPi \u043d\u0435 \u0431\u043e\u0433\u0430\u0442\u0430 \u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: WiFi-\u0430\u043d\u0442\u0435\u043d\u043d\u0430, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0430\u044f \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435, \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u044a\u0435\u043c, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u0430\u044f Tina Linux \u043d\u0435 \u0431\u0443\u0442\u0438\u0442\u0441\u044f, \u0430 \u044f\u0434\u0440\u043e Ubuntu \u0434\u043b\u044f AllWinner Nezha \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 WiFi\/Bluetooth. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f USB \u0445\u0430\u0431 \u0438\u043b\u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441 Type-C \u043d\u0430 USB, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c Movidius \u0441\u0442\u0438\u043a.<\/p>\n<p>\u0421\u0430\u043c NCS2 \u044d\u0442\u043e \u0441\u043e-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Myriad-X \u0432 \u0444\u043e\u0440\u043c-\u0444\u0430\u043a\u0442\u043e\u0440\u0435 USB \u0444\u043b\u0435\u0448\u043a\u0438. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043e\u0435\u043c\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0435\u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u0435\u0440\u0442\u043e\u0447\u043d\u044b\u0445).<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 RISC-V \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430<\/h2>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 Ubuntu \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0447\u0435\u0440\u0435\u0437 <code>apt-get install crossbuild-essential-riscv64<\/code>, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u0430\u043c RISC-V \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 GitHub. \u0421\u0430\u043c\u0443\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0443 \u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c.<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:<\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get install -y --no-install-recommends git autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/riscv-collab\/riscv-gnu-toolchain --depth 1<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong>: \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 QEMU \u0441 Ubuntu 20.04 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c GCC \u0438 GLIBC \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\">cd riscv-gnu-toolchain git submodule init git submodule update glibc &amp;&amp; git submodule update gcc cd glibc &amp;&amp; git checkout glibc-2.31 cd gcc &amp;&amp; git checkout releases\/gcc-9.4.0<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430:<\/p>\n<pre><code class=\"bash\">.\/configure --prefix=\/opt\/riscv sudo make linux -j$(nproc --all)<\/code><\/pre>\n<\/li>\n<\/ul>\n<h2>\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f OpenVINO<\/h2>\n<p>OpenVINO \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 Intel, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041a\u0440\u043e\u043c\u0435 Intel Architecture (CPU, GPU, VPU) \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <a href=\"https:\/\/github.com\/openvinotoolkit\/openvino_contrib\"><u>\u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442<\/u><\/a> \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f ARM \u0438 NVIDIA.<\/p>\n<p>\u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 CMake \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>riscv64.toolchain.cmake<\/code>. \u0412\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>riscv64.toolchain.cmake<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cmake\">set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR riscv64)  if(NOT DEFINED CMAKE_C_COMPILER)   find_program(CMAKE_C_COMPILER NAMES riscv64-unknown-linux-gnu-gcc                                 PATHS \/opt\/riscv\/bin ENV PATH) endif()  if(NOT DEFINED CMAKE_CXX_COMPILER)   find_program(CMAKE_CXX_COMPILER NAMES riscv64-unknown-linux-gnu-g++                                   PATHS \/opt\/riscv\/bin ENV PATH) endif()  set(CMAKE_SYSROOT \/opt\/riscv\/sysroot CACHE PATH \"RISC-V sysroot\")  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 OpenVINO:<\/p>\n<pre><code class=\"bash\">git clone --recurse-submodules -j$(nproc --all) https:\/\/github.com\/openvinotoolkit\/openvino --depth 1<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043d\u0430 Ubuntu 22.04 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432: libusb \u043f\u043e\u0434 RISC-V, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f OpenVINO \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 Movidius \u0441\u0442\u0438\u043a\u043e\u043c,  \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f Python \u043e\u0431\u0435\u0440\u0442\u043e\u043a. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e apt-get, \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443:<\/p>\n<pre><code class=\"bash\">sudo dpkg --add-architecture riscv64<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 update, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f amd64 \u0438 riscv64 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440:<\/p>\n<pre><code class=\"bash\">sudo sed -i -E 's|^deb ([^ ]+) (.*)$|deb [arch=amd64] \\1 \\2\\ndeb [arch=riscv64] http:\/\/ports.ubuntu.com\/ubuntu-ports\/ \\2|' \/etc\/apt\/sources.list sudo apt-get update<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y --no-install-recommends \\   libusb-1.0-0-dev:riscv64 \\   libpython3-dev:riscv64 \\   cython3<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041d\u0443 \u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c header \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Python \u043e\u0431\u0435\u0440\u0442\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0433\u0440\u0443\u0431\u043e:<\/p>\n<pre><code class=\"bash\">sudo sed -i -E 's|riscv64-linux-gnu\/python3.10\/pyconfig.h|\/usr\/include\/riscv64-linux-gnu\/python3.10\/pyconfig.h|' \/usr\/include\/python3.10\/pyconfig.h<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CMake \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libusb:<\/p>\n<pre><code class=\"bash\">cmake \\   -DCMAKE_TOOLCHAIN_FILE=\/path\/to\/riscv64.toolchain.cmake \\   -DLIBUSB_LIBRARY=\/usr\/lib\/riscv64-linux-gnu\/libusb-1.0.so \\   -DLIBUSB_INCLUDE_DIR=\/usr\/include\/libusb-1.0 \\   -DTHREADING=SEQ \\   -DENABLE_OPENCV=OFF \\   -DENABLE_PYTHON=ON \\   -DENABLE_SAMPLES=OFF \\   -DPYTHON_INCLUDE_DIR=\/usr\/include\/python3.10 \\   -DPYTHON_MODULE_EXTENSION=\".so\" \\   -DPYTHON_LIBRARY=\/usr\/lib\/riscv64-linux-gnu\/libpython3.10.so \\   -S openvino -B openvino_build       cmake --build openvino_build -j$(nproc --all) cmake --install openvino_build --prefix openvino_install<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f OpenCV<\/h3>\n<p>OpenCV \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e OpenVINO, \u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Python \u043e\u0431\u0435\u0440\u0442\u043a\u0430\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 OpenCV<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">git clone --depth 1 https:\/\/github.com\/opencv\/opencv\/  python3 -m pip install numpy==1.21.5  cmake \\   -DCMAKE_TOOLCHAIN_FILE=$(realpath opencv\/platforms\/linux\/riscv64-gcc.toolchain.cmake) \\   -DCMAKE_INSTALL_PREFIX=$(realpath opencv_install) \\   -DCMAKE_BUILD_TYPE=Release \\   -DBUILD_LIST=core,imgcodecs,python3 \\   -DPYTHON3_NUMPY_INCLUDE_DIRS=$HOME\/.local\/lib\/python3.10\/site-packages\/numpy\/core\/include\/ \\   -DPYTHON3_INCLUDE_PATH=\/usr\/include\/python3.10 \\   -DPYTHON3_LIBRARIES=\/usr\/lib\/riscv64-linux-gnu\/libpython3.10.so \\   -DPYTHON3_EXECUTABLE=\/usr\/bin\/python3.10 \u00a0\\   -DPYTHON3_CVPY_SUFFIX=\".cpython-310-riscv64-linux-gnu.so\" \\   -S opencv -B opencv_build  cmake --build opencv_build -j$(nproc --all) cmake --install opencv_build --prefix opencv_install<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 QEMU<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043a\u0430 \u0436\u0434\u0451\u0442\u0435 \u0441\u0432\u043e\u044e RISC-V \u0431\u043e\u0440\u0434\u0443, \u043d\u043e \u0443\u0436\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c QEMU. \u0421\u0430\u043c RISC-V \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0442\u043e\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a <code>qemu-riscv64<\/code>, \u043d\u043e \u0432 \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c USB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ul>\n<li>\n<p> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 QEMU \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\">sudo apt-get install qemu-system-misc opensbi u-boot-qemu qemu-utils<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 Ubuntu:<\/p>\n<pre><code class=\"bash\">wget https:\/\/cdimage.ubuntu.com\/releases\/20.04.2\/release\/ubuntu-20.04.2-preinstalled-server-riscv64.img.xz  xz -dk ubuntu-20.04.2-preinstalled-server-riscv64.img.xz<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 udev \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 NCS. \u0414\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0433 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 QEMU:<\/p>\n<pre><code class=\"bash\">sudo usermod -a -G users \"$(whoami)\"  (\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 logout)  sudo cp openvino_install\/install_dependencies\/97-myriad-usbboot.rules \/etc\/udev\/rules.d\/ sudo udevadm control --reload-rules sudo udevadm trigger sudo ldconfig<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u0430\u0436\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 <code>productId<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c USB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430: <code>2485<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 Movidius \u0441\u0442\u0438\u043a\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 <code>f63b<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u044f\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0442\u0438\u043a\u0443 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"bash\">qemu-system-riscv64 \\     -machine virt -nographic -m 2048 -smp 2 \\     -bios \/usr\/lib\/riscv64-linux-gnu\/opensbi\/generic\/fw_jump.elf \\     -kernel \/usr\/lib\/u-boot\/qemu-riscv64_smode\/uboot.elf \\     -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \\     -usb -device usb-ehci,id=ehci \\     -device usb-host,vendorid=0x03e7,productid=0x2485 \\     -device usb-host,vendorid=0x03e7,productid=0xf63b \\     -drive file=ubuntu-20.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 udev \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 USB \u0441\u0442\u0438\u043a, \u043d\u043e \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 QEMU. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u043e\u0442\u043e\u0432, \u0438 \u043d\u0430 \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u043f\u043b\u0430\u0442\u0435<\/h3>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 OpenVINO \u0438 OpenCV \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 MangoPi MQ-Pro \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SSH (\u0438\u043b\u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 SD \u043a\u0430\u0440\u0442\u0443). \u0417\u0430\u0442\u0435\u043c, \u0443\u0436\u0435 \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435, \u0434\u043e\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 end2end \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Telegram \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439.<\/p>\n<pre><code class=\"bash\">python3 -m pip install --upgrade pip python3 -m pip install pytelegrambotapi<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c: <a href=\"https:\/\/drive.yadro.com\/s\/yDADeW2S8FST5bs\"><u>the_scream_style_transfer.xml<\/u><\/a> \u0438 <a href=\"https:\/\/drive.yadro.com\/s\/jDd5sD5rFbeJYSG\"><u>the_scream_style_transfer.bin<\/u><\/a>. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Python \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430 (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438).<\/p>\n<pre><code class=\"bash\">source opencv_install\/bin\/setup_vars_opencv4.sh source openvino_install\/setupvars.sh export PYTHONPATH=\/home\/ubuntu\/openvino_install\/python\/python3.10\/:$PYTHONPATH  python3 bot.py --token XXX<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import os import numpy as np import cv2 as cv import telebot import argparse import io from openvino.runtime import Core  WORK_WIDTH = 640 WORK_HEIGHT = 640  class StyleTransfer:     def __init__(self, xml_path):         core = Core()         model = core.read_model(xml_path)         model = core.compile_model(model, \"MYRIAD\")         self.ireq = model.create_infer_request()          def process(self, img):         h, w = img.shape[0], img.shape[1]          img = cv.resize(img, (WORK_WIDTH, WORK_HEIGHT))  # resize to fixed input resolution         img = img.reshape(1, WORK_HEIGHT, WORK_WIDTH, 3).transpose(0, 3, 1, 2).astype(np.float32)         img -= np.array([103.939, 116.779, 123.68]).reshape(1, 3, 1, 1)         img \/= 255          out = self.ireq.infer([img])         out = next(iter(out.values()))          out += np.array([103.939, 116.779, 123.68]).reshape(1, 3, 1, 1)         out = np.clip(out, 0, 255).astype(np.uint8)          out = out.transpose(0, 2, 3, 1).reshape(WORK_HEIGHT, WORK_WIDTH, 3)         out = cv.resize(out, (w, h))          return out   parser = argparse.ArgumentParser() parser.add_argument('--token', help='Telegram bot token', required=True) args = parser.parse_args()  model = StyleTransfer(\"the_scream_style_transfer.xml\")  bot = telebot.TeleBot(args.token)  def get_image(message):     fileID = message.photo[-1].file_id     file = bot.get_file(fileID)     data = bot.download_file(file.file_path)     buf = np.frombuffer(data, dtype=np.uint8)     return cv.imdecode(buf, cv.IMREAD_COLOR)  def send_image(message, img):     _, buf = cv.imencode(\".jpg\", img, [cv.IMWRITE_JPEG_QUALITY, 90])     outputbuf = io.BytesIO(buf)     bot.send_photo(message.chat.id, outputbuf)  @bot.message_handler(content_types=['photo']) def process_image(message):      img = get_image(message)     stylized = model.process(img)     send_image(message, stylized)  bot.polling()<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/e92\/8a9\/2a8\/e928a92a8e1a8d72a8920048c6bc79dc.jpg\" alt=\"\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Telegram Bot \u043d\u0430 MangoPi \u0441 Movidius \u0441\u0442\u0438\u043a\u043e\u043c. \u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f 640x640 \u2014 \u043c\u0435\u043d\u0435\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434.\" title=\"\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Telegram Bot \u043d\u0430 MangoPi \u0441 Movidius \u0441\u0442\u0438\u043a\u043e\u043c. \u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f 640x640 \u2014 \u043c\u0435\u043d\u0435\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434.\" width=\"288\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e92\/8a9\/2a8\/e928a92a8e1a8d72a8920048c6bc79dc.jpg\" data-blurred=\"true\"\/><figcaption>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Telegram Bot \u043d\u0430 MangoPi \u0441 Movidius \u0441\u0442\u0438\u043a\u043e\u043c. \u0412\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f 640&#215;640 \u2014 \u043c\u0435\u043d\u0435\u0435 2 \u0441\u0435\u043a\u0443\u043d\u0434.<\/figcaption><\/figure>\n<h2>\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u041c\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0432\u0430\u0436\u043d\u044b\u043c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041d\u0443 \u0430 \u0435\u0441\u043b\u0438 \u0442\u0435\u043c\u0430 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 RISC-V. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/yadro\/blog\/694024\/\"> https:\/\/habr.com\/ru\/company\/yadro\/blog\/694024\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>RISC-V \u2014 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0430\u044f royalty \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0436\u0435\u043b\u0435\u0437\u0430 \u043d\u0430 \u0435\u0451 \u043e\u0441\u043d\u043e\u0432\u0435. \u041d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 RISC-V \u0440\u0430\u0441\u0442\u0451\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0451 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0436\u0435\u043b\u0435\u0437\u0435 \u0438 \u0441\u043e\u0444\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e CPU \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0435 \u0441 \u043d\u0438\u043c Linux \u044f\u0434\u0440\u043e \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0445\u043e\u0442\u044f RVV 0.7.1 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0438 RVV 1.0 \u0432\u043e\u0442-\u0432\u043e\u0442 \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442. \u0412 \u043d\u0430\u0448\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0435 \u0442\u0440\u0443\u0434\u043e\u0435\u043c\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a OpenVINO \u0438 OpenCV \u043d\u0430 RISC-V \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0426\u0435\u043b\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u2014 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f RISC-V CPU \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u0435\u043c Intel Movidius Neural Compute Stick 2 (NCS2). \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u043e\u0434 RISC-V. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043d\u043e \u043c\u044b \u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u0441\u0435 \u043e\u043d\u0438 \u0441\u043f\u0440\u044f\u0447\u0443\u0442\u0441\u044f \u043f\u043e\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 CI\/CD, \u043a\u0430\u043a \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0431\u044b\u043b\u043e \u0441 ARM-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0447\u0435\u0440\u0435\u0437 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 QEMU \u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 <a href=\"https:\/\/mangopi.org\/mqpro\"><u>MangoPi MQ-Pro<\/u><\/a>. \u041d\u0430 QEMU \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"http:\/\/old-releases.ubuntu.com\/releases\/focal\/\"><u>\u043e\u0431\u0440\u0430\u0437<\/u><\/a> Ubuntu 20.04 \u0434\u043b\u044f RISC-V, \u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 MangoPi \u2014 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e Ubuntu 22.04 \u0434\u043b\u044f AllWinner Nezha (<a href=\"https:\/\/ubuntu.com\/download\/risc-v\"><u>\u0441\u0441\u044b\u043b\u043a\u0430<\/u><\/a>).<\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e MangoPi \u043d\u0435 \u0431\u043e\u0433\u0430\u0442\u0430 \u043d\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: WiFi-\u0430\u043d\u0442\u0435\u043d\u043d\u0430, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0430\u044f \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435, \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u044a\u0435\u043c, \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u0430\u044f Tina Linux \u043d\u0435 \u0431\u0443\u0442\u0438\u0442\u0441\u044f, \u0430 \u044f\u0434\u0440\u043e Ubuntu \u0434\u043b\u044f AllWinner Nezha \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 WiFi\/Bluetooth. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f USB \u0445\u0430\u0431 \u0438\u043b\u0438 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u0441 Type-C \u043d\u0430 USB, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c Movidius \u0441\u0442\u0438\u043a.<\/p>\n<p>\u0421\u0430\u043c NCS2 \u044d\u0442\u043e \u0441\u043e-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Myriad-X \u0432 \u0444\u043e\u0440\u043c-\u0444\u0430\u043a\u0442\u043e\u0440\u0435 USB \u0444\u043b\u0435\u0448\u043a\u0438. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043e\u0435\u043c\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0435\u0432 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u0435\u0440\u0442\u043e\u0447\u043d\u044b\u0445).<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 RISC-V \u0442\u0443\u043b\u0447\u0435\u0439\u043d\u0430<\/h2>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432 Ubuntu \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0447\u0435\u0440\u0435\u0437 <code>apt-get install crossbuild-essential-riscv64<\/code>, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u0430\u043c RISC-V \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 GitHub. \u0421\u0430\u043c\u0443\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0443 \u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c.<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:<\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get install -y --no-install-recommends git autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/riscv-collab\/riscv-gnu-toolchain --depth 1<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong>: \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 QEMU \u0441 Ubuntu 20.04 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c GCC \u0438 GLIBC \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\">cd riscv-gnu-toolchain git submodule init git submodule update glibc &amp;&amp; git submodule update gcc cd glibc &amp;&amp; git checkout glibc-2.31 cd gcc &amp;&amp; git checkout releases\/gcc-9.4.0<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430:<\/p>\n<pre><code class=\"bash\">.\/configure --prefix=\/opt\/riscv sudo make linux -j$(nproc --all)<\/code><\/pre>\n<\/li>\n<\/ul>\n<h2>\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f OpenVINO<\/h2>\n<p>OpenVINO \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 Intel, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435\u0439\u0440\u043e\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041a\u0440\u043e\u043c\u0435 Intel Architecture (CPU, GPU, VPU) \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <a href=\"https:\/\/github.com\/openvinotoolkit\/openvino_contrib\"><u>\u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442<\/u><\/a> \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f ARM \u0438 NVIDIA.<\/p>\n<p>\u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 CMake \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>riscv64.toolchain.cmake<\/code>. \u0412\u043d\u0443\u0442\u0440\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>riscv64.toolchain.cmake<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cmake\">set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR riscv64)  if(NOT DEFINED CMAKE_C_COMPILER)   find_program(CMAKE_C_COMPILER NAMES riscv64-unknown-linux-gnu-gcc                                 PATHS \/opt\/riscv\/bin ENV PATH) endif()  if(NOT DEFINED CMAKE_CXX_COMPILER)   find_program(CMAKE_CXX_COMPILER NAMES riscv64-unknown-linux-gnu-g++                                   PATHS \/opt\/riscv\/bin ENV PATH) endif()  set(CMAKE_SYSROOT \/opt\/riscv\/sysroot CACHE PATH \"RISC-V sysroot\")  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 OpenVINO:<\/p>\n<pre><code class=\"bash\">git clone --recurse-submodules -j$(nproc --all) https:\/\/github.com\/openvinotoolkit\/openvino --depth 1<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043d\u0430 Ubuntu 22.04 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432: libusb \u043f\u043e\u0434 RISC-V, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f OpenVINO \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 Movidius \u0441\u0442\u0438\u043a\u043e\u043c,  \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f Python \u043e\u0431\u0435\u0440\u0442\u043e\u043a. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e apt-get, \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443:<\/p>\n<pre><code class=\"bash\">sudo dpkg --add-architecture riscv64<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 update, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f amd64 \u0438 riscv64 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440:<\/p>\n<pre><code class=\"bash\">sudo sed -i -E 's|^deb ([^ ]+) (.*)$|deb [arch=amd64] \\1 \\2\\ndeb [arch=riscv64] http:\/\/ports.ubuntu.com\/ubuntu-ports\/ \\2|' \/etc\/apt\/sources.list sudo apt-get update<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y --no-install-recommends \\   libusb-1.0-0-dev:riscv64 \\   libpython3-dev:riscv64 \\   cython3<\/code><\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>\u041d\u0443 \u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c header \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Python \u043e\u0431\u0435\u0440\u0442\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0433\u0440\u0443\u0431\u043e:<\/p>\n<pre><code class=\"bash\">sudo sed -i -E 's|riscv64-linux-gnu\/python3.10\/pyconfig.h|\/usr\/include\/riscv64-linux-gnu\/python3.10\/pyconfig.h|' \/usr\/include\/python3.10\/pyconfig.h<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u0431\u043e\u0440\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CMake \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libusb:<\/p>\n<pre><code class=\"bash\">cmake \\   -DCMAKE_TOOLCHAIN_FILE=\/path\/to\/riscv64.toolchain.cmake \\   -DLIBUSB_LIBRARY=\/usr\/lib\/riscv64-linux-gnu\/libusb-1.0.so \\   -DLIBUSB_INCLUDE_DIR=\/usr\/include\/libusb-1.0 \\   -DTHREADING=SEQ \\   -DENABLE_OPENCV=OFF \\   -DENABLE_PYTHON=ON \\   -DENABLE_SAMPLES=OFF \\   -DPYTHON_INCLUDE_DIR=\/usr\/include\/python3.10 \\   -DPYTHON_MODULE_EXTENSION=\".so\" \\   -DPYTHON_LIBRARY=\/usr\/lib\/riscv64-linux-gnu\/libpython3.10.so \\   -S openvino -B openvino_build       cmake --build openvino_build -j$(nproc --all) cmake --install openvino_build --prefix openvino_install<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u041a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f OpenCV<\/h3>\n<p>OpenCV \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e OpenVINO, \u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Python \u043e\u0431\u0435\u0440\u0442\u043a\u0430\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 OpenCV<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">git clone --depth 1 https:\/\/github.com\/opencv\/opencv\/  python3 -m pip install numpy==1.21.5  cmake \\   -DCMAKE_TOOLCHAIN_FILE=$(realpath opencv\/platforms\/linux\/riscv64-gcc.toolchain.cmake) \\   -DCMAKE_INSTALL_PREFIX=$(realpath opencv_install) \\   -DCMAKE_BUILD_TYPE=Release \\   -DBUILD_LIST=core,imgcodecs,python3 \\   -DPYTHON3_NUMPY_INCLUDE_DIRS=$HOME\/.local\/lib\/python3.10\/site-packages\/numpy\/core\/include\/ \\   -DPYTHON3_INCLUDE_PATH=\/usr\/include\/python3.10 \\   -DPYTHON3_LIBRARIES=\/usr\/lib\/riscv64-linux-gnu\/libpython3.10.so \\   -DPYTHON3_EXECUTABLE=\/usr\/bin\/python3.10 \u00a0\\   -DPYTHON3_CVPY_SUFFIX=\".cpython-310-riscv64-linux-gnu.so\" \\   -S opencv -B opencv_build  cmake --build opencv_build -j$(nproc --all) cmake --install opencv_build --prefix opencv_install<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 QEMU<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043a\u0430 \u0436\u0434\u0451\u0442\u0435 \u0441\u0432\u043e\u044e RISC-V \u0431\u043e\u0440\u0434\u0443, \u043d\u043e \u0443\u0436\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u044b \u0432 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c QEMU. \u0421\u0430\u043c RISC-V \u0442\u0443\u043b\u0447\u0435\u0439\u043d \u0442\u043e\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a <code>qemu-riscv64<\/code>, \u043d\u043e \u0432 \u043d\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c USB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<ul>\n<li>\n<p> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 QEMU \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"bash\">sudo apt-get install qemu-system-misc opensbi u-boot-qemu qemu-utils<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 Ubuntu:<\/p>\n<pre><code class=\"bash\">wget https:\/\/cdimage.ubuntu.com\/releases\/20.04.2\/release\/ubuntu-20.04.2-preinstalled-server-riscv64.img.xz  xz -dk ubuntu-20.04.2-preinstalled-server-riscv64.img.xz<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 udev \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 NCS. \u0414\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0433 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 QEMU:<\/p>\n<pre><code class=\"bash\">sudo usermod -a -G users \"$(whoami)\"  (\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 logout)  sudo cp openvino_install\/install_dependencies\/97-myriad-usbboot.rules \/etc\/udev\/rules.d\/ sudo udevadm control --reload-rules sudo udevadm trigger sudo ldconfig<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u0430\u0436\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 <code>productId<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c USB-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430: <code>2485<\/code>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 Movidius \u0441\u0442\u0438\u043a\u0443 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0438 <code>f63b<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u044f\u0442\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0442\u0438\u043a\u0443 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"bash\">qemu-system-riscv64 \\     -machine virt -nographic -m 2048 -smp 2 \\     -bios \/usr\/lib\/riscv64-linux-gnu\/opensbi\/generic\/fw_jump.elf \\     -kernel \/usr\/lib\/u-boot\/qemu-riscv64_smode\/uboot.elf \\     -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \\     -usb -device usb-ehci,id=ehci \\     -device usb-host,vendorid=0x03e7,productid=0x2485 \\     -device usb-host,vendorid=0x03e7,productid=0xf63b \\     -drive file=ubuntu-20.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 udev \u043f\u0440\u0430\u0432\u0438\u043b \u043d\u0430 USB \u0441\u0442\u0438\u043a, \u043d\u043e \u0443\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 QEMU. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0433\u043e\u0442\u043e\u0432, \u0438 \u043d\u0430 \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u043d\u0430 \u043f\u043b\u0430\u0442\u0435<\/h3>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 OpenVINO \u0438 OpenCV \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 MangoPi MQ-Pro \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SSH (\u0438\u043b\u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 SD \u043a\u0430\u0440\u0442\u0443). \u0417\u0430\u0442\u0435\u043c, \u0443\u0436\u0435 \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435, \u0434\u043e\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 end2end \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c Telegram \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439.<\/p>\n<pre><code class=\"bash\">python3 -m pip install --upgrade pip python3 -m pip install pytelegrambotapi<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c: <a href=\"https:\/\/drive.yadro.com\/s\/yDADeW2S8FST5bs\"><u>the_scream_style_transfer.xml<\/u><\/a> \u0438 <a href=\"https:\/\/drive.yadro.com\/s\/jDd5sD5rFbeJYSG\"><u>the_scream_style_transfer.bin<\/u><\/a>. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Python \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430 (\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438).<\/p>\n<pre><code class=\"bash\">source opencv_install\/bin\/setup_vars_opencv4.sh source openvino_install\/setupvars.sh export PYTHONPATH=\/home\/ubuntu\/openvino_install\/python\/python3.10\/:$PYTHONPATH  python3 bot.py --token XXX<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import os import numpy as np import cv2 as cv import telebot import argparse import io from openvino.runtime<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-340331","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=340331"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340331\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}