Code Monkey home page Code Monkey logo

jetson-nano's Introduction

CÀI ĐẶT CƠ BẢN JETSON NANO

alt text

Đầu tiên khi mới mua Jetson Nano các bác cài Ubuntu theo hướng dẫn chính thức từ site

https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit

TUỲ CHỌN: DÙNG SSD THAY CHO THẺ NHỚ

alt text

https://www.jetsonhacks.com/2021/03/10/jetson-nano-boot-from-usb

https://www.youtube.com/watch?v=53rRMr1IpWs

CÀI ĐẶT HOME ASSISTANT SUPERVISOR TRÊN JETSON NANO

alt text Mở Terminal của Jetson Nano và chạy các dòng lệnh này

sudo -i
apt-get update && apt-get upgrade -y && apt-get autoremove -y
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat

curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
bash installer.sh --machine qemuarm-64


CÀI DEEPSTACK OBJECT DETECTION TRÊN DOCKER

Mở Terminal của Jetson Nano và chạy các dòng lệnh này alt text

sudo docker run -d --name deepstack --restart=unless-stopped --runtime nvidia -e VISION-DETECTION=True -v localstorage:/datastore -p 80:5000 deepquestai/deepstack:jetpack

Lưu ý:

  • Không cần cài Docker vì bản Ubuntu chính thức của Jetson Nano đã có sẵn.

  • dòng lệnh --runtime NVIDIA chữ viết HOA không chạy, phải viết thường --runtime nvidia

  • dòng lệnh docker run -d nghĩa là chạy ở chế độ nền

  • dòng lệnh --restart=unless-stopped nghĩa là tự khởi động lại sau khi bật máy



KIỂM TRA DEEPSTACK DOCKER LOG

alt text Khi chạy DEEPSTACK ở chế độ nền, nếu muốn xem log thì chạy dòng lệnh này trên terminal của Jetson Nano

sudo docker container logs -f deepstack


CẤU HÌNH HOME ASSISTANT ĐỂ SỬ DỤNG TÍNH NĂNG OBJECT DETECTION

alt text

https://github.com/robmarkcole/HASS-Deepstack-object

https://www.youtube.com/watch?v=vMdpLiAB9dI



TẠO AUTOMATION ĐỂ CẬP NHẬT CẢM BIẾN MỖI GIÂY MỘT LẦN

alt text

- alias: "deepstack.time_based_trigger"
  mode: parallel
  trigger:
    - platform: time_pattern
      seconds: "/1"
  condition: []
  action:
    - condition: numeric_state
      entity_id: sensor.processor_use_percent
      below: 80
    - service: system_log.write
      data:
        level: info
        message: "{{ now().strftime('%S.%f') [:-4] }} Start Scannig on Processor Use Percent  {{ states.sensor.processor_use_percent.state }}"
    - service: image_processing.scan
      target:
        entity_id:
          - image_processing.camera_1
          - image_processing.camera_2
          - image_processing.camera_5
          - image_processing.camera_6
          - image_processing.e43460774
          - image_processing.e73655823
  • Dòng này có nghĩa là ngừng chạy nếu CPU load đang trên 60%
    - condition: numeric_state
      entity_id: sensor.processor_use_percent
      below: 80
  • Dòng này có nghĩa là in ra log của Home Assistant
    - service: system_log.write
      data:
        level: info
        message: "{{ now().strftime('%S.%f') [:-4] }} Start Scannig on Processor Use Percent  {{ states.sensor.processor_use_percent.state }}"


RESET DOCKER

Delete Home Assistant

stop services

sudo systemctl stop hassio-supervisor.service
sudo systemctl stop hassio-apparmor.service

disable services

sudo systemctl disable hassio-supervisor.service
sudo systemctl disable hassio-apparmor.service

remove services

sudo rm -rf /etc/systemd/system/hassio-supervisor.service
sudo rm -rf /etc/systemd/system/hassio-apparmor.service

removing hassio folders (except the config folder)

sudo rm -rf /usr/sbin/hassio-supervisor
sudo rm -rf /usr/sbin/hassio-apparmor

If you want to delete your Home Assistant config files, Do the following, but be carefull! Your config is lost forever:

sudo rm -rf /usr/share/hassio/

To delete all containers including its volumes use,

docker rm -vf $(docker ps -a -q)

To delete all the images,

docker rmi -f $(docker images -a -q)

jetson-nano's People

Contributors

tuanha2000vn avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

daovietduy99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.