[{"data":1,"prerenderedAt":353},["ShallowReactive",2],{"content-query-xzhNeqmjAT":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":10,"date":11,"cover":12,"type":13,"category":14,"body":15,"_type":347,"_id":348,"_source":349,"_file":350,"_stem":351,"_extension":352},"/technology-blogs/en/1838","en",false,"",[9],"MindSpore Made Easy","A guide on MindSpore installation","2022-07-04","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/11/28/8eebe2a79d32497294b80483bfd5ca98.png","technology-blogs","Install from Source",{"type":16,"children":17,"toc":344},"root",[18,32,38,53,64,69,88,96,101,108,119,126,138,150,157,162,169,174,179,186,191,196,203,208,215,222,227,234,239,250,257,267,277,282,289,294,299,303,310,315,322,327,334,339],{"type":19,"tag":20,"props":21,"children":23},"element","h1",{"id":22},"mindspore-made-easy-installing-mindspore-170-gpu-version-on-jetson-agx-orin",[24,30],{"type":19,"tag":25,"props":26,"children":27},"span",{},[28],{"type":29,"value":9},"text",{"type":29,"value":31}," Installing MindSpore 1.7.0 GPU Version on Jetson AGX Orin",{"type":19,"tag":33,"props":34,"children":35},"p",{},[36],{"type":29,"value":37},"July 4, 2022",{"type":19,"tag":33,"props":39,"children":40},{},[41,43,51],{"type":29,"value":42},"The author once managed to compile and install MindSpore 1.6.0 CUDA 11 on Jetson AGX Orin using GCC 7.3.0: ",{"type":19,"tag":44,"props":45,"children":49},"a",{"href":46,"rel":47},"https://bbs.huaweicloud.com/forum/thread-186292-1-1.html",[48],"nofollow",[50],{"type":29,"value":46},{"type":29,"value":52},".",{"type":19,"tag":33,"props":54,"children":55},{},[56,58],{"type":29,"value":57},"He also tried to compile MindSpore 1.8.0 CUDA 11 using GCC 9.4.0 but failed: ",{"type":19,"tag":44,"props":59,"children":62},{"href":60,"rel":61},"https://bbs.huaweicloud.com/forum/thread-193443-1-1.html",[48],[63],{"type":29,"value":60},{"type":19,"tag":33,"props":65,"children":66},{},[67],{"type":29,"value":68},"So today, we'll follow him to install the version 1.7.0, which is officially displayed as the latest version.",{"type":19,"tag":33,"props":70,"children":71},{},[72,74,80,82,87],{"type":29,"value":73},"Point the soft links of GCC and G++ to ",{"type":19,"tag":75,"props":76,"children":77},"strong",{},[78],{"type":29,"value":79},"/usr/bin/gcc-9",{"type":29,"value":81}," and ",{"type":19,"tag":75,"props":83,"children":84},{},[85],{"type":29,"value":86},"/usr/bin/g++-9",{"type":29,"value":52},{"type":19,"tag":33,"props":89,"children":90},{},[91],{"type":19,"tag":92,"props":93,"children":95},"img",{"alt":7,"src":94},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/4a72819ae8d74a3ea42f7a8f7476ce05.png",[],{"type":19,"tag":33,"props":97,"children":98},{},[99],{"type":29,"value":100},"Download the MindSpore 1.7 source package.",{"type":19,"tag":33,"props":102,"children":103},{},[104],{"type":19,"tag":92,"props":105,"children":107},{"alt":7,"src":106},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/d8029d890b28429aacf635b2a7051a3c.png",[],{"type":19,"tag":33,"props":109,"children":110},{},[111,113,118],{"type":29,"value":112},"Modify ",{"type":19,"tag":75,"props":114,"children":115},{},[116],{"type":29,"value":117},"build_mindspore.sh",{"type":29,"value":52},{"type":19,"tag":33,"props":120,"children":121},{},[122],{"type":19,"tag":92,"props":123,"children":125},{"alt":7,"src":124},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/40552490798141ea97e9b4c774f9adad.png",[],{"type":19,"tag":33,"props":127,"children":128},{},[129,131,136],{"type":29,"value":130},"As pointed out in the preceding figure, ",{"type":19,"tag":75,"props":132,"children":133},{},[134],{"type":29,"value":135},"-DENABLE_GITEE=ON",{"type":29,"value":137}," is added.",{"type":19,"tag":33,"props":139,"children":140},{},[141,143,148],{"type":29,"value":142},"Run the ",{"type":19,"tag":75,"props":144,"children":145},{},[146],{"type":29,"value":147},"./build.sh -e gpu -j12",{"type":29,"value":149}," command to start compilation.",{"type":19,"tag":33,"props":151,"children":152},{},[153],{"type":19,"tag":92,"props":154,"children":156},{"alt":7,"src":155},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/606a472de3ca41c39b9da21cbcc103de.png",[],{"type":19,"tag":33,"props":158,"children":159},{},[160],{"type":29,"value":161},"...",{"type":19,"tag":33,"props":163,"children":164},{},[165],{"type":19,"tag":92,"props":166,"children":168},{"alt":7,"src":167},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/5a49eaddf7da459aae9473975f9076be.png",[],{"type":19,"tag":33,"props":170,"children":171},{},[172],{"type":29,"value":173},"Surprisingly, the compilation runs smoothly.",{"type":19,"tag":33,"props":175,"children":176},{},[177],{"type":29,"value":178},"Have a look at the Python version used for compilation.",{"type":19,"tag":33,"props":180,"children":181},{},[182],{"type":19,"tag":92,"props":183,"children":185},{"alt":7,"src":184},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/9cea7817e2404ecaa01032f6794580bf.png",[],{"type":19,"tag":33,"props":187,"children":188},{},[189],{"type":29,"value":190},"It is Python 3.9.",{"type":19,"tag":33,"props":192,"children":193},{},[194],{"type":29,"value":195},"Check the compilation result.",{"type":19,"tag":33,"props":197,"children":198},{},[199],{"type":19,"tag":92,"props":200,"children":202},{"alt":7,"src":201},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/4d26451f0e80465b8091d367765df8bc.png",[],{"type":19,"tag":33,"props":204,"children":205},{},[206],{"type":29,"value":207},"Create a conda environment:",{"type":19,"tag":33,"props":209,"children":210},{},[211],{"type":19,"tag":92,"props":212,"children":214},{"alt":7,"src":213},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/bddfe92ac09e4a33b8c26dd85e0ab950.png",[],{"type":19,"tag":33,"props":216,"children":217},{},[218],{"type":19,"tag":92,"props":219,"children":221},{"alt":7,"src":220},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/12150c2b92264e7aae0dc3da3f13bb05.png",[],{"type":19,"tag":33,"props":223,"children":224},{},[225],{"type":29,"value":226},"Check the version.",{"type":19,"tag":33,"props":228,"children":229},{},[230],{"type":19,"tag":92,"props":231,"children":233},{"alt":7,"src":232},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/901df87a7af941328991b1a9e682962b.png",[],{"type":19,"tag":33,"props":235,"children":236},{},[237],{"type":29,"value":238},"Then, the installation starts.",{"type":19,"tag":33,"props":240,"children":241},{},[242,244],{"type":29,"value":243},"pip install ./mindspore_gpu-1.7.0-cp39-cp39-linux_aarch64.whl -i ",{"type":19,"tag":44,"props":245,"children":248},{"href":246,"rel":247},"https://pypi.tuna.tsinghua.edu.cn/simple",[48],[249],{"type":29,"value":246},{"type":19,"tag":33,"props":251,"children":252},{},[253],{"type":19,"tag":92,"props":254,"children":256},{"alt":7,"src":255},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/f7505211b1664c1e8e9c4b4f46d3de84.png",[],{"type":19,"tag":33,"props":258,"children":259},{},[260,262],{"type":29,"value":261},"Verification: ",{"type":19,"tag":75,"props":263,"children":264},{},[265],{"type":29,"value":266},"vi test.py",{"type":19,"tag":268,"props":269,"children":271},"pre",{"code":270},"import numpy as np\n\nfrom mindspore import Tensor\n\nimport mindspore.ops as ops\n\nimport mindspore.context as context\n\n\n\ncontext.set_context(device_target=\"GPU\")\n\nx = Tensor(np.ones([1,3,3,4]).astype(np.float32))\n\ny = Tensor(np.ones([1,3,3,4]).astype(np.float32))\n\nprint(ops.add(x, y))\n",[272],{"type":19,"tag":273,"props":274,"children":275},"code",{"__ignoreMap":7},[276],{"type":29,"value":270},{"type":19,"tag":33,"props":278,"children":279},{},[280],{"type":29,"value":281},"python test.py",{"type":19,"tag":33,"props":283,"children":284},{},[285],{"type":19,"tag":92,"props":286,"children":288},{"alt":7,"src":287},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/af4debdbf9b744aaacddff3e3ef67c2f.png",[],{"type":19,"tag":33,"props":290,"children":291},{},[292],{"type":29,"value":293},"Return to the base.",{"type":19,"tag":33,"props":295,"children":296},{},[297],{"type":29,"value":298},"conda deactivate",{"type":19,"tag":33,"props":300,"children":301},{},[302],{"type":29,"value":281},{"type":19,"tag":33,"props":304,"children":305},{},[306],{"type":19,"tag":92,"props":307,"children":309},{"alt":7,"src":308},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/6cb6d46e76b8430d915b81df45facf5e.png",[],{"type":19,"tag":33,"props":311,"children":312},{},[313],{"type":29,"value":314},"python3 test.py",{"type":19,"tag":33,"props":316,"children":317},{},[318],{"type":19,"tag":92,"props":319,"children":321},{"alt":7,"src":320},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/6af8b8c66d1b47219531b24ee72aa537.png",[],{"type":19,"tag":33,"props":323,"children":324},{},[325],{"type":29,"value":326},"It seems that Python and Python 3 have multiple versions.",{"type":19,"tag":33,"props":328,"children":329},{},[330],{"type":19,"tag":92,"props":331,"children":333},{"alt":7,"src":332},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2022/09/29/262668aa71214207a17afb2465df379a.png",[],{"type":19,"tag":33,"props":335,"children":336},{},[337],{"type":29,"value":338},"The two are allowed in the base environment. However, in the Orin Python 3.9 environment of conda, both are not supported.",{"type":19,"tag":33,"props":340,"children":341},{},[342],{"type":29,"value":343},"That's weird. It is still a puzzle for us to solve.",{"title":7,"searchDepth":345,"depth":345,"links":346},4,[],"markdown","content:technology-blogs:en:1838.md","content","technology-blogs/en/1838.md","technology-blogs/en/1838","md",1776506105236]