Nvidia jetson xavier隨手記錄

  1. 查看GPU信息,不是使用nvidia-smi,而是使用tegrastats
  2. 讓docker使用gpu,使用下面的代碼來代替docker命令,將下面的代碼保存為txdocker.sh文件,加入執(zhí)行權(quán)限。
#!/bin/bash
#Jason T. 2-6-2018

# Check specifically for the run command
if [[ $# -ge 2 && $1 == "run" ]]; then
    # Tell docker to share the following folders with the base system
    # This allows the docker containers to find CUDA, cuDNN, TensorRT
    LIB_MAPS="/usr/lib/aarch64-linux-gnu \
              /usr/local/cuda \
              /usr/local/cuda/lib64"
         
    # GPU device sharing is for a docker container to have access to
    # system devices as found in the /dev directory
    DEVICES="/dev/nvhost-ctrl \
             /dev/nvhost-ctrl-gpu \
             /dev/nvhost-prof-gpu \
             /dev/nvmap \
             /dev/nvhost-gpu \
             /dev/nvhost-as-gpu"
    
    # There is a need to map the libraries inside the container
    # in the exact way programs would expect to find them as
    # though the TX2 were operating without containers
    LIBS=""
    for lib in $LIB_MAPS; do
        LIBS="$LIBS -v $lib:$lib"
    done
    
    DEVS=""
    for dev in $DEVICES; do
        DEVS="$DEVS --device=$dev"
    done
    
    #echo "docker run $LIBS $DEVS ${@:2}"
    docker run $LIBS $DEVS ${@:2}
else
    # Run command not found, run everything straight through docker
    #echo "docker $@"
    docker $@
fi
  1. 在更換軟件源的時(shí)候,需要注意,清華源中格式為
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

應(yīng)該將其改成

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse

加一個(gè)-ports,這是因?yàn)閤avier中自帶的源的格式就是這樣的

  1. bazel 安裝
    與在linux下的安裝不同,bazel需要從源碼進(jìn)行編譯
    首先要安裝java
sudo apt-get install openjdk-8-jdk

然后下載bazel的源碼包

wget https://github.com/bazelbuild/bazel/releases/download/0.19.2/bazel-0.19.2-dist.zip

此處我使用的是0.19.2版本
然后就是編譯了

unzip bazel-0.19.2-dist.zip
cd bazel
./compile.sh
sudo cp output/bazel /usr/local/bin
  1. tensorflow安裝
    首先是安裝依賴
$ sudo apt-get install autoconf automake libtool curl make # Protobuf Dependencies
$ sudo apt-get install python-numpy swig python-dev python-wheel      # TensorFlow Dependencies

然后按照下面教程進(jìn)行安裝就好
https://devtalk.nvidia.com/default/topic/1055131/jetson-agx-xavier/building-tensorflow-1-13-on-jetson-xavier/post/5355747/#5355747

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 本文部分內(nèi)容摘錄:http://www.cnblogs.com/xuxinkun/p/5983633.html D...
    liuzg0734閱讀 4,867評(píng)論 0 3
  • Hadoop v3.1 YARN和Kubernetes v1.9對(duì)GPU調(diào)度支持的比較 1.0. namespac...
    eddy88閱讀 1,350評(píng)論 1 1
  • 追蹤不是為了證明! 曾經(jīng)有很多的研究學(xué)家,為了研究某些科研論證,會(huì)拿人或者是動(dòng)物做實(shí)驗(yàn)!通過不斷的嘗試,最終看所謂...
    星宸閣主閱讀 398評(píng)論 0 1
  • 就在星期二的時(shí)候,我們班正常上創(chuàng)意寫作課。是李茜老師上的,每節(jié)課都留作業(yè)。這次留的是一首小詩,題目叫做《花的故事...
    冷格玉荻閱讀 204評(píng)論 1 2
  • 是夜,月不朗星不稀,烏鵲早已南飛 今夕,你一言我一語,駕舟乘風(fēng)西游
    Tom青年閱讀 206評(píng)論 0 0

友情鏈接更多精彩內(nèi)容