├── .gitignore ├── Dockerfile ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.whl -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM pinto0309/raspios_lite_armhf:2022-02-10_bullseye 2 | 3 | ENV DEBIAN_FRONTEND=noninteractive 4 | ENV NO_CUDA=1 5 | ENV NO_DISTRIBUTED=1 6 | ENV NO_MKLDNN=1 7 | ENV USE_NCCL=OFF 8 | ENV USE_XNNPACK=OFF 9 | ENV USE_TBB=ON 10 | ENV BUILD_TEST=OFF 11 | ARG TORCHVER=v1.10.2 12 | ARG TORCHVISIONVER=v0.11.3 13 | ARG TORCHAUDIOVER=v0.10.2 14 | # 1.22.2 15 | ARG NUMPYVER=1.22.2 16 | 17 | RUN apt update --allow-releaseinfo-change \ 18 | && apt upgrade -y \ 19 | && apt install -y \ 20 | automake autoconf libpng-dev nano \ 21 | curl zip unzip libtool swig zlib1g-dev pkg-config git wget xz-utils \ 22 | libopenblas-dev libblas-dev m4 cmake python3-dev python3-yaml \ 23 | python3-setuptools python3-pip python3-mock sox libsox-dev \ 24 | libpython3-dev libpython3-all-dev g++ gcc libatlas-base-dev \ 25 | libtbb-dev \ 26 | && apt clean \ 27 | && rm -rf /var/lib/apt/lists/* 28 | 29 | RUN pip3 install pip --upgrade \ 30 | && pip3 install cython==0.29.27 \ 31 | && pip3 install numpy==${NUMPYVER} \ 32 | && pip3 install cmake==3.21.2 \ 33 | && pip3 install ninja==1.10.2.3 \ 34 | && pip3 install typing_extensions==4.0.1 \ 35 | && pip3 install -U six wheel mock \ 36 | && ldconfig \ 37 | && pip cache purge 38 | 39 | # PyTorch 40 | RUN mkdir -p /wheels \ 41 | && git clone -b ${TORCHVER} https://github.com/pytorch/pytorch.git \ 42 | && cd pytorch \ 43 | && git submodule update --init --recursive \ 44 | && pip3 install -r requirements.txt \ 45 | && python3 setup.py build \ 46 | && cd build/lib.linux-armv7l-3.7/torch \ 47 | && ln -s _C.cpython-37m-arm-linux-gnueabihf.so _C.so \ 48 | && ln -s _dl.cpython-37m-arm-linux-gnueabihf.so _dl.so \ 49 | && cd ../../.. \ 50 | && python3 setup.py bdist_wheel \ 51 | && cp dist/* /wheels \ 52 | && cd .. \ 53 | && rm -rf /pytorch 54 | 55 | # TorchVision 56 | RUN git clone -b ${TORCHVISIONVER} https://github.com/pytorch/vision.git \ 57 | && cd vision \ 58 | && git submodule update --init --recursive \ 59 | && pip3 install /wheels/*.whl \ 60 | && python3 setup.py build \ 61 | && python3 setup.py bdist_wheel \ 62 | && cp dist/* /wheels \ 63 | && cd .. \ 64 | && rm -rf /vision 65 | 66 | # TorchAudio 67 | RUN git clone -b ${TORCHAUDIOVER} https://github.com/pytorch/audio.git \ 68 | && cd audio \ 69 | && git submodule update --init --recursive \ 70 | && python3 setup.py build \ 71 | && python3 setup.py bdist_wheel \ 72 | && cp dist/* /wheels \ 73 | && cd .. \ 74 | && rm -rf /audio 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pytorch4raspberrypi 2 | Cross-compilation of PyTorch armv7l (32bit) for RaspberryPi OS 3 | 4 | **[Cross-compilation of PyTorch v1.9.0 armv7l for RaspberryPi OS Buster](https://zenn.dev/pinto0309/articles/b796e2d6396c1e)** 5 | 6 | ## 1. Environment 7 | - Ubuntu 20.04 x86_64 8 | - Docker 9 | 10 | ## 2. Procedure 11 | A very time-consuming but very easy cross-compilation procedure. It will take about three hours. Performed on Ubuntu 20.04 x86_64. 12 | ## 2-1. [Method 1] Docker build 13 | ``` 14 | $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes \ 15 | && docker build -t pytorch4raspberrypi . 16 | 17 | ##### A pre-built .whl file will be generated directly under the /wheels folder. 18 | 19 | $ docker run --rm -it -v ${PWD}:/work pytorch4raspberrypi /bin/bash 20 | 21 | # cp /wheels/* work 22 | # exit 23 | 24 | $ sudo chmod -R 777 *.whl 25 | ``` 26 | ## 2-2. [Method 2] Manual build 27 | ``` 28 | $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 29 | $ docker run --rm -it \ 30 | -v ${PWD}:/workdir \ 31 | pinto0309/raspios_lite_armhf:2022-02-10_bullseye \ 32 | /bin/bash 33 | ``` 34 | All of the following operations were performed on a RaspberryPi OS armv7l 32-bit Docker container running on Ubuntu 20.04 x86_64. 35 | ``` 36 | # apt update && apt upgrade -y 37 | 38 | # apt-get update && apt-get install -y \ 39 | openjdk-11-jdk automake autoconf libpng-dev nano \ 40 | curl zip unzip libtool swig zlib1g-dev pkg-config git wget xz-utils \ 41 | libopenblas-dev libblas-dev m4 cmake python3-dev python3-yaml \ 42 | python3-setuptools python3-pip python3-mock \ 43 | libpython3-dev libpython3-all-dev g++ gcc libatlas-base-dev \ 44 | libtbb-dev sox libsox-dev 45 | 46 | # pip3 install pip --upgrade 47 | # pip3 install cython==0.29.27 numpy==1.22.2 cmake==3.21.2 ninja==1.10.2.3 typing_extensions==4.0.1 48 | 49 | # pip3 install -U six wheel mock && ldconfig 50 | 51 | # TORCH=v1.10.2 \ 52 | && TORCHVISION=v0.11.3 \ 53 | && TORCHAUDIO=v0.10.2 54 | 55 | # git clone -b ${TORCH} https://github.com/pytorch/pytorch.git 56 | 57 | ########################################################## 58 | pytorch/torch/csrc/utils/python_arg_parser.h:415:94 59 | pytorch/torch/csrc/utils/python_arg_parser.h:442:94 60 | pytorch/torch/csrc/autograd/python_function.cpp:439:11 61 | 62 | %ld -> %d 63 | ########################################################## 64 | 65 | # cd pytorch \ 66 | && git submodule update --init --recursive \ 67 | && pip3 install -r requirements.txt \ 68 | && NO_CUDA=1 NO_DISTRIBUTED=1 NO_MKLDNN=1 USE_NCCL=OFF USE_XNNPACK=OFF USE_TBB=ON BUILD_TEST=OFF python3 setup.py build \ 69 | && cd build/lib.linux-armv7l-3.9/torch \ 70 | && ln -s _C.cpython-39-arm-linux-gnueabihf.so _C.so \ 71 | && ln -s _dl.cpython-39-arm-linux-gnueabihf.so _dl.so \ 72 | && cd ../../.. 73 | # python3 setup.py bdist_wheel 74 | 75 | -- ******** Summary ******** 76 | -- General: 77 | -- CMake version : 3.21.2 78 | -- CMake command : /usr/local/lib/python3.9/dist-packages/cmake/data/bin/cmake 79 | -- System : Linux 80 | -- C++ compiler : /usr/bin/c++ 81 | -- C++ compiler id : GNU 82 | -- C++ compiler version : 10.2.1 83 | -- Using ccache if found : ON 84 | -- Found ccache : CCACHE_PROGRAM-NOTFOUND 85 | -- CXX flags : -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow 86 | -- Build type : Release 87 | -- Compile definitions : ONNX_ML=1;ONNXIFI_ENABLE_EXT=1;ONNX_NAMESPACE=onnx_torch;HAVE_MMAP=1;_FILE_OFFSET_BITS=64;HAVE_SHM_OPEN=1;HAVE_SHM_UNLINK=1;HAVE_MALLOC_USABLE_SIZE=1;USE_EXTERNAL_MZCRC;MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS 88 | -- CMAKE_PREFIX_PATH : /usr/lib/python3.9/site-packages 89 | -- CMAKE_INSTALL_PREFIX : /pytorch/torch 90 | -- USE_GOLD_LINKER : OFF 91 | -- 92 | -- TORCH_VERSION : 1.10.0 93 | -- CAFFE2_VERSION : 1.10.0 94 | -- BUILD_CAFFE2 : ON 95 | -- BUILD_CAFFE2_OPS : ON 96 | -- BUILD_CAFFE2_MOBILE : OFF 97 | -- BUILD_STATIC_RUNTIME_BENCHMARK: OFF 98 | -- BUILD_TENSOREXPR_BENCHMARK: OFF 99 | -- BUILD_BINARY : OFF 100 | -- BUILD_CUSTOM_PROTOBUF : ON 101 | -- Link local protobuf : ON 102 | -- BUILD_DOCS : OFF 103 | -- BUILD_PYTHON : True 104 | -- Python version : 3.9.2 105 | -- Python executable : /usr/bin/python3 106 | -- Pythonlibs version : 3.9.2 107 | -- Python library : /usr/lib/libpython3.9.so.1.0 108 | -- Python includes : /usr/include/python3.9 109 | -- Python site-packages: lib/python3.9/site-packages 110 | -- BUILD_SHARED_LIBS : ON 111 | -- CAFFE2_USE_MSVC_STATIC_RUNTIME : OFF 112 | -- BUILD_TEST : False 113 | -- BUILD_JNI : OFF 114 | -- BUILD_MOBILE_AUTOGRAD : OFF 115 | -- BUILD_LITE_INTERPRETER: OFF 116 | -- INTERN_BUILD_MOBILE : 117 | -- USE_BLAS : 1 118 | -- BLAS : open 119 | -- USE_LAPACK : 1 120 | -- LAPACK : open 121 | -- USE_ASAN : OFF 122 | -- USE_CPP_CODE_COVERAGE : OFF 123 | -- USE_CUDA : OFF 124 | -- USE_ROCM : OFF 125 | -- USE_EIGEN_FOR_BLAS : ON 126 | -- USE_FBGEMM : OFF 127 | -- USE_FAKELOWP : OFF 128 | -- USE_KINETO : ON 129 | -- USE_FFMPEG : OFF 130 | -- USE_GFLAGS : OFF 131 | -- USE_GLOG : OFF 132 | -- USE_LEVELDB : OFF 133 | -- USE_LITE_PROTO : OFF 134 | -- USE_LMDB : OFF 135 | -- USE_METAL : OFF 136 | -- USE_PYTORCH_METAL : OFF 137 | -- USE_PYTORCH_METAL_EXPORT : OFF 138 | -- USE_FFTW : OFF 139 | -- USE_MKL : OFF 140 | -- USE_MKLDNN : OFF 141 | -- USE_NCCL : OFF 142 | -- USE_NNPACK : ON 143 | -- USE_NUMPY : ON 144 | -- USE_OBSERVERS : ON 145 | -- USE_OPENCL : OFF 146 | -- USE_OPENCV : OFF 147 | -- USE_OPENMP : ON 148 | -- USE_TBB : ON 149 | -- USE_SYSTEM_TBB : OFF 150 | -- USE_VULKAN : OFF 151 | -- USE_PROF : OFF 152 | -- USE_QNNPACK : ON 153 | -- USE_PYTORCH_QNNPACK : ON 154 | -- USE_REDIS : OFF 155 | -- USE_ROCKSDB : OFF 156 | -- USE_ZMQ : OFF 157 | -- USE_DISTRIBUTED : ON 158 | -- USE_MPI : OFF 159 | -- USE_GLOO : OFF 160 | -- USE_GLOO_WITH_OPENSSL : OFF 161 | -- USE_TENSORPIPE : ON 162 | -- USE_DEPLOY : OFF 163 | -- USE_BREAKPAD : ON 164 | -- Public Dependencies : Threads::Threads 165 | -- Private Dependencies : pthreadpool;cpuinfo;qnnpack;pytorch_qnnpack;nnpack;fp16;tensorpipe;aten_op_header_gen;foxi_loader;rt;fmt::fmt-header-only;kineto;gcc_s;gcc;dl 166 | -- USE_COREML_DELEGATE : OFF 167 | -- Configuring done 168 | -- Generating done 169 | -- Build files have been written to: /pytorch/build 170 | 171 | # cp dist/* /workdir 172 | # cd .. 173 | 174 | # git clone -b ${TORCHVISION} https://github.com/pytorch/vision.git 175 | 176 | # cd vision \ 177 | && git submodule update --init --recursive \ 178 | && pip3 install /pytorch/dist/*.whl \ 179 | && python3 setup.py build \ 180 | && python3 setup.py bdist_wheel 181 | 182 | # cp dist/* /workdir 183 | # cd .. 184 | 185 | # git clone -b ${TORCHAUDIO} https://github.com/pytorch/audio.git 186 | # cd audio \ 187 | && git submodule update --init --recursive \ 188 | && python3 setup.py build \ 189 | && python3 setup.py bdist_wheel 190 | 191 | # cp dist/* /workdir 192 | # cd .. 193 | 194 | # exit 195 | ``` 196 | # 3. Install 197 | Running on RaspberryPi. 198 | ``` 199 | $ sudo apt install -y libatlas-base-dev libpng-dev nano \ 200 | curl zip unzip libtool swig zlib1g-dev pkg-config git wget xz-utils \ 201 | libopenblas-dev libblas-dev m4 cmake cython python3-dev python3-yaml \ 202 | libtbb-dev 203 | 204 | $ sudo pip3 install numpy==1.22.2 205 | 206 | $ sudo pip3 install torch-*_armv7l_.whl torchvision-*_armv7l.whl torchaudio-*_armv7l.whl 207 | ``` 208 | --------------------------------------------------------------------------------