1、 从官方containers 使用命令行pull docker
2、运行 deepstream docker
sudo docker run -it -p 105:83 --runtime nvidia -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.1 -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
3、
docker ps 查看启用的docker
docker exec 启用
docker stop id/name 停用docker
4、运行示例
step1:cd …/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-test1
step2:阅读README
sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev
cc -c -o deepstream_test1_app.o -DPLATFORM_TEGRA -I…/…/…/includes -I /usr/local/cuda-10.2/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include deepstream_test1_app.c
cc -o deepstream-test1-app deepstream_test1_app.o -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -L/usr/local/cuda-10.2/lib64/ -lcudart -L/opt/nvidia/deepstream/deepstream-5.1/lib/ -lnvdsgst_meta -lnvds_meta -lcuda -Wl,-rpath,/opt/nvidia/deepstream/deepstream-5.1/lib/
sudo docker run -it -p 105:83 --runtime nvidia -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-5.1 -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
docker exec -it /bin/bash 登录到容器里。
apt install vim openssl openssh-server
初始化sshd:
ssh-keygen -t dsa -P “” -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa -P “” -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t ecdsa -P “” -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -t ed25519 -P “” -f /etc/ssh/ssh_host_ed25519_key
修改/etc/ssh/sshd_config
PermitRootLogin yes
Port 给容器分配的端口号
ListenAddress 0.0.0.0
PermitRootLogin yes
ListenAddress 0.0.0.0
Port 82
启用sshd :/usr/sbin/sshd
测试:lsof -i:82(82是给容器分配的端口号)
相当于启用了一个新的linux系统,需要修改密码
passwd
打开一个新的终端到容器外面测试:
ssh root@192.168.2.103 -p 104 (104是容器映射到主机的端口,在本地使用ssh服务测试能否登录容器)
输入上一步设置的密码,如果没有设置密码会提示”Permission denied, please try again“。
最后使用远程登录工具连接docker使用!
Docker commit:
docker commit [选项] <容器ID或容器名> [<仓库名>[:<标签>]]
查看当前目录的文件数:
ls -l | grep “^-” | wc -l
apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev