Docker deepstream

Change yourself, adapt to the environment, and follow the trend. What does this have to do with God and others?
Docker does not go to the Internet, configure the same DNS as the host, vim /etc/resolv.conf ,systemctl restart docker

docker exec -it 容器-id /bin/bash
Ubuntu install docker

Image export and import
Export container:
docker commit 9115621ada47 deepstream:1.0
docker save -o deepstream_docker1.tar deepstream:1.0
sudo docker load --input deepstream_docker1.tar
If the transmission is not complete, it may be that the machine does not have enough space. Clean it up

Docker file from the host to the container
docker cp /root/init.sh CS5_AS_EALL1:/home/hundsun/workspace/log
modify the docker default path

xhost +
docker run --gpus all -it --rm --net=host -e DISPLAY=$DISPLAY -w /root 你镜像的id或者名字    
-w就是打开你镜像里面的目录
加上--rm这个容器就被删除了

in docker if this problem:error while loading shared libraries: libcudart.so.10.0
https://www.cnblogs.com/carle-09/p/12377492.html     same work in docker

Modify and save the image: remember must exec container, then exit, commit. not run image, exit, commit
or docker run... docker ps -a docker commit container name docker start container name docker exec -it container name/bin/bash

docker run;创建和启动一个新的容器实例,操作对象是镜像,选项较多,如果你要创建和启动一个容器,只能用run;
docker exec: 在已运行的容器中,执行命令,操作对象是容器,如果你要进入已运行的容器,并且执行命令,用exec;
docker attach: 同样操作的是已运行的容器,可以将本机标准输入(键盘输入)输到容器中,也可以将容器的输出显示在本机的屏幕上,如果你想查看容器运行过程中产生的标准输入输出,用attach;

1. English description of the documentation
Metaphor: Mirror: exe, container: process, Docker system platform
Run: docker run image-name or ID
delete: docker rmi image-name/ID
shows all containers (including those that have been stopped): docker ps -a
Running: docker ps
docker start/stop/restart Container ID
Even if a container has exited, it will still exist. You can use the docker ps -a command to view it. Command docker rm to delete the container.
The docker kill command is used to kill a running Docker container.
The docker pause command is used to pause the running Docker container.
The docker unpause command is used to start a paused Docker container.
The docker stop command is used to exit the running Docker container.

Dockerfile
1、FROM,是以哪个镜像为基础创造新镜像
2、ENV指令设置容器中的环境变量
3、COPY指令向镜像添加目录、文件等
4、CMD指令设置容器运行时的默认命令
5、WORKDIR指令为Dockerfile中的任何RUN、CMD和COPY指令设置工作目录

English docker instruction document
Chinese instruction document
savior big instruction is for dGPU platform, if you are jetson, see below

jetson,Docker

Author: k8seasy
link: https: //www.zhihu.com/question/384345807/answer/1164155598
Source: know almost
copyrighted by the author. For commercial reprints, please contact the author for authorization, and for non-commercial reprints, please indicate the source.

Let's explain the benefits of docker from the simplest way of speaking. Suppose I have a host linux, I will use yum config make make install to install various software, which is awesome, why do I need docker? Then let’s take a look at this kind of example. One day the boss said that Xiao Zhang would install a mysql 5.2 , The company’s forum needs to be used, the version should be low, simple yum install to get it. Everything is simple. At this time, the new technology Lao Li said that I would also install a mysql 5.7. Remember, I need 5.7 because I use new features in it. … Can’t pretend? The machine is 32-core 128G memory. Is it possible that only one mysql version can be installed on a server? At this time, the development department said to install php 5.7, and the test said that it needs to run a php 6.0. The two use yum to install the conflicts constantly, have you found it? Version conflict! This is the core of what you need to solve. Different versions, such as a php version may have several versions, each version needs to install a different glibc, mysqlclient, different so. Everyone conflicts with each other. Docker solves this problem. Where do you usually put lib files? /var/lib/... These places, which lead to conflicts, and because of ldconfig, you may conflict where you put them. So docker has only one core capability, isolation. It puts all the libs needed by an environment in its mirror. This mirror is php 5.7, this mirror is 7.0, and that mirror is 3.0. No one can see others among them. At the same time, it makes all mirrors think that there is only one of them in the system, so that there is no conflict anymore, which is called virtualization.

Guess you like

Origin blog.csdn.net/qq_41834780/article/details/110422950