Deep Neural Network Model Deployment - Docker Learning

There are three core concepts in container technology: Container, Image, and Registry

Please add a picture description
In essence, containers are a type of virtualization technology, similar to virtual machines (Virtual Machines), which can split system resources and isolate application processes, but containers are lighter and more efficient than virtual machines. It is more suitable for the needs of cloud computing.

A mirror is a static form of a container. It packages applications together with dependent operating systems, configuration files, environment variables, etc., so that they can run on any system, eliminating a lot of trouble in deployment, operation and maintenance and platform migration. The mirror is composed of multiple layers (Layer), each layer is a set of files, and multiple layers will be merged into a file system using Union FS technology for the container to use. The advantage of this fine-grained structure is that the same layer can be shared and reused, which saves the cost of disk storage and network transmission, and makes the work of building images easier.

In order to facilitate the management of images, a mirror warehouse has emerged, which stores various containerized applications in a centralized manner, and users can upload and download them at will, which is the best way to distribute images.

At present, the most well-known public image warehouse is Docker Hub, and others include quay.io and gcr.io. We can find many high-quality images on these websites and integrate them into our own application systems.

There are many specific implementations of container technology. Docker is the first and most popular container technology. Its main form is "Docker Engine" running on Linux. The docker command we use every day is actually just a front-end tool, it must communicate with the background service "Docker daemon" to achieve various functions. Common commands for operating containers include docker ps, docker run, docker exec, docker stop, etc.; common commands for operating images include docker images, docker rmi, docker build, docker tag, etc.; common commands for operating mirror warehouses include docker pull and docker push wait.

Container technology mind map:

Please add a picture description
Containerization simplifies the packaging, distribution, and deployment of applications. A few simple commands can complete tasks that required a lot of scripting before, which is absolutely cool for development and operation and maintenance.

shortcoming:

  • It is still necessary to manually run some commands to start the application, and then manually confirm the running status.
  • Running an application composed of multiple containers is cumbersome and requires manual intervention (such as checking IP addresses) to maintain network communication.
  • The existing network mode function is only suitable for a single machine. How to run applications and load balance on multiple servers?
  • What if you want to increase the number of applications?

That's when container technology can't help at all.

what to do--

"Container Orchestration"

Next: Kubernetes

Guess you like

Origin blog.csdn.net/weixin_44659309/article/details/130607779