2021-03-20, Material of Dana Sheahen
https://courses.nvidia.com/courses/course-v1:DLI+S-RX-02+V2/info
Fig.: JupyterLab Interface. Source: NVIDIA Course Getting Started with AI on Jetson Nano, Dana Sheahen
sudo docker run --runtime nvidia -it --rm --network host \ --volume ~/nvdli-data:/nvdli-nano/data \ --device /dev/video0 \ nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.5.0 # PW: dlinano
# Two CSI cams version! video0, video1 sudo docker run --runtime nvidia -it --rm --network host \ --volume ~/nvdli-data:/nvdli-nano/data \ --volume /tmp/argus_socket:/tmp/argus_socket \ --device /dev/video0 \ --device /dev/video1 \ nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.5.0 # PW: dlinano
Before you change the boot target (aka runlevel) to multi-user.target, i.e. without GUI, you should change the keyboard configuration first in case you are not using an English keyboard layout. A wrong keyboard layout can cause a lot of trouble. It can even prevent you from logging in when your password is using characters affected by the layout configuration.
Open a terminal window and execute sudo dpkg-reconfigure keyboard-configuration
.
Test it on a tty terminal, too, because that is what you get if you change the runlevel to other than graphical.
Press <crtl> + <alt> + '1'
to get to a tty terminal. Test your credentials. A wrong keyboard layout may compromise your password typing.
systemctl get-default # change target of current session systemctl isolate multi-user.target # systemctl isolate graphical.target # Use this to get back to graphical mode # set default target systemctl set-default multi-user.target # systemctl set-default graphical.target # Use this to get back to graphical mode
Software by Dustin Franklin, NVIDIA: https://github.com/dusty-nv/jetson-inference
For his examples I am using Jetpack 4.5
Input Streams are listed here:
* Video Streaming, camera settings, devices, input streams
The cameras must be connected before starting the docker container. The docker image detects the connected cams during the start phase.
cd jetson-inference docker/run
It starts the docker container as an interactive session.
Inside the running docker container instance the application video-viewer can be executed on the command line. It connects to the camera device defined in the first command line argument and opens a view port (window) to show the camera stream.
# My Jetson Nano 4BG B01 kit has two cams connected via flex flat band cable (ffc) video-viewer csi://0 video-viewer csi://1 video-viewer csi://0 & video-viewer csi://1 # External USB cam is enumerated as video2 video-viewer v4l2:///dev/video2
segnet --network=fcn-resnet18-mhp /dev/video2
Alternative to remote desktop! Usually remote desktop clients require a full desktop environment including connected monitor(!) which can be controlled remotely. I don't like it!
Let's go for some terminal based X11 solution!
Press <alt>-<ctrl> F2
get a tty terminal. You may have to press <enter> to activate the screen.
login.
Then call localectl
to list all locale tettings. In order to change the keyboard to German execute:
locale set-keymap de
When you login the next time the keyboard map is changed. Check it again with localectl
.
VC Keymap: de
should be set now.
sudo -i service --status-all dpkg-reconfigure lightdm # dpkg-reconfigure gdm3
Dual Cam Multi-Threading, Haar Face Detector
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04
https://www.tightvnc.com/download.php
https://freundschafter.com/research/how-to-install-xfce-and-vnc-on-a-headless-ubuntu-18-04/
CompuLab Display Emulator (fit-Headless)
This emulator appears to the Jetson to be a HDMI monitor. X11 and the desktop
Allow X without HDMI at Boot:
Edit /etc/X11/xorg.conf Section "Device" ... ... Option "AllowEmptyInitialConfiguration" "true" EndSection
Which will allow X11 to startup without a monitor attached.
Source: https://www.jetsonhacks.com/2016/05/03/jetson-allow-graphics-without-hdmi/
Source: https://www.tecmint.com/change-runlevels-targets-in-systemd/
systemctl get-default # change target of current session systemctl isolate multi-user.target systemctl isolate graphical.target # set default target systemctl set-default multi-user.target systemctl set-default graphical.target