Install Image Docker



Install Docker Engine from binaries. Estimated reading time: 5 minutes. Note: You may have been redirected to this page because there is no longer a dynamically-linked Docker package for your Linux distribution. The list returned depends on which repositories are enabled, and is specific to your version of CentOS (indicated by the.el7 suffix in this example). Install a specific version by its fully qualified package name, which is the package name (docker-ce) plus the version string (2nd column) starting at the first colon (:), up to the first hyphen, separated by a hyphen (-).

  • When the command is invoked, docker contacts Docker hub and downloads a docker image called ‘hello-world’. Docker then creates a new container that runs the executable script that streams the message ‘ Hello from Docker! To download or pull an image from Docker hub without running it, use the syntax: $ sudo docker pull image-name.
  • Use a Docker. Image for GPU Build a Docker. Image for GPU. Prerequisites: GPU is not available in container by default, you must attach it to the container. Kernel driver must be installed on the host. Intel® OpenCL™ runtime package must be included into the container. In the container, non-root user must be in the video and render groups.
Docker

Estimated reading time: 10 minutes

To get started with Docker Engine on CentOS, make sure youmeet the prerequisites, theninstall Docker.

Prerequisites

OS requirements

To install Docker Engine, you need a maintained version of CentOS 7 or 8.Archived versions aren’t supported or tested.

The centos-extras repository must be enabled. This repository is enabled bydefault, but if you have disabled it, you need tore-enable it.

The overlay2 storage driver is recommended.

Uninstall old versions

Older versions of Docker were called docker or docker-engine. If these areinstalled, uninstall them, along with associated dependencies.

It’s OK if yum reports that none of these packages are installed.

The contents of /var/lib/docker/, including images, containers, volumes, andnetworks, are preserved. The Docker Engine package is now called docker-ce.

Installation methods

You can install Docker Engine in different ways, depending on your needs:

  • Most usersset up Docker’s repositories and installfrom them, for ease of installation and upgrade tasks. This is therecommended approach.

  • Some users download the RPM package andinstall it manually and manageupgrades completely manually. This is useful in situations such as installingDocker on air-gapped systems with no access to the internet.

  • In testing and development environments, some users choose to use automatedconvenience scripts to install Docker.

Install using the repository

Before you install Docker Engine for the first time on a new host machine, you needto set up the Docker repository. Afterward, you can install and update Dockerfrom the repository.

Set up the repository

Install the yum-utils package (which provides the yum-config-managerutility) and set up the stable repository.

Optional: Enable the nightly or test repositories.

These repositories are included in the docker.repo file above but are disabledby default. You can enable them alongside the stable repository. The followingcommand enables the nightly repository.

To enable the test channel, run the following command:

You can disable the nightly or test repository by running theyum-config-manager command with the --disable flag. To re-enable it, usethe --enable flag. The following command disables the nightly repository.

Learn about nightly and test channels.

Install Docker Engine

  1. Install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:

    If prompted to accept the GPG key, verify that the fingerprint matches060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35, and if so, accept it.

    Got multiple Docker repositories?

    If you have multiple Docker repositories enabled, installingor updating without specifying a version in the yum install oryum update command always installs the highest possible version,which may not be appropriate for your stability needs.

    Docker is installed but not started. The docker group is created, but no users are added to the group.

  2. To install a specific version of Docker Engine, list the available versionsin the repo, then select and install:

    a. List and sort the versions available in your repo. This example sorts results by version number, highest to lowest, and is truncated:

    The list returned depends on which repositories are enabled, and is specificto your version of CentOS (indicated by the .el7 suffix in this example).

    b. Install a specific version by its fully qualified package name, which is the package name (docker-ce) plus the version string (2nd column) starting at the first colon (:), up to the first hyphen, separated by a hyphen (-). For example, docker-ce-18.09.1.

    Docker is installed but not started. The docker group is created, but no users are added to the group.

  3. Start Docker.

  4. Verify that Docker Engine is installed correctly by running the hello-worldimage.

    This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.

Docker Engine is installed and running. You need to use sudo to run Dockercommands. Continue to Linux postinstall to allownon-privileged users to run Docker commands and for other optional configurationsteps.

Upgrade Docker Engine

To upgrade Docker Engine, follow the installation instructions,choosing the new version you want to install.

Install from a package

If you cannot use Docker’s repository to install Docker, you can download the.rpm file for your release and install it manually. You need to downloada new file each time you want to upgrade Docker Engine.

  1. Go to https://download.docker.com/linux/centos/and choose your version of CentOS. Then browse to x86_64/stable/Packages/and download the .rpm file for the Docker version you want to install.

    Note: To install a nightly or test (pre-release) package,change the word stable in the above URL to nightly or test.Learn about nightly and test channels.

  2. Install Docker Engine, changing the path below to the path where you downloadedthe Docker package.

    Docker is installed but not started. The docker group is created, but nousers are added to the group.

  3. Start Docker.

  4. Verify that Docker Engine is installed correctly by running the hello-worldimage.

    This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.

Docker Engine is installed and running. You need to use sudo to run Docker commands.Continue to Post-installation steps for Linux to allownon-privileged users to run Docker commands and for other optional configurationsteps.

Upgrade Docker Engine

To upgrade Docker Engine, download the newer package file and repeat theinstallation procedure, using yum -y upgradeinstead of yum -y install, and pointing to the new file.

Install using the convenience script

Docker provides convenience scripts at get.docker.comand test.docker.com for installing edge andtesting versions of Docker Engine - Community into development environments quickly andnon-interactively. The source code for the scripts is in thedocker-install repository.Using these scripts is not recommended for productionenvironments, and you should understand the potential risks before you usethem:

  • The scripts require root or sudo privileges to run. Therefore,you should carefully examine and audit the scripts before running them.
  • The scripts attempt to detect your Linux distribution and version andconfigure your package management system for you. In addition, the scripts donot allow you to customize any installation parameters. This may lead to anunsupported configuration, either from Docker’s point of view or from your ownorganization’s guidelines and standards.
  • The scripts install all dependencies and recommendations of the packagemanager without asking for confirmation. This may install a large number ofpackages, depending on the current configuration of your host machine.
  • The script does not provide options to specify which version of Docker to install,and installs the latest version that is released in the “edge” channel.
  • Do not use the convenience script if Docker has already been installed on thehost machine using another mechanism.

This example uses the script at get.docker.com toinstall the latest release of Docker Engine - Community on Linux. To install the latesttesting version, use test.docker.com instead. Ineach of the commands below, replace each occurrence of get with test.

Warning:

Always examine scripts downloaded from the internet beforerunning them locally.

If you would like to use Docker as a non-root user, you should now consideradding your user to the “docker” group with something like:

Install Image Docker

Remember to log out and back in for this to take effect!

Warning:

Adding a user to the “docker” group grants them the ability to run containerswhich can be used to obtain root privileges on the Docker host. Refer toDocker Daemon Attack Surfacefor more information.

Install docker image offlineInstall Image Docker

Docker Engine - Community is installed. It starts automatically on DEB-based distributions. OnRPM-based distributions, you need to start it manually using the appropriatesystemctl or service command. As the message indicates, non-root users can’trun Docker commands by default.

Note:

To install Docker without root privileges, seeRun the Docker daemon as a non-root user (Rootless mode).

Upgrade Docker after using the convenience script

If you installed Docker using the convenience script, you should upgrade Dockerusing your package manager directly. There is no advantage to re-running theconvenience script, and it can cause issues if it attempts to re-addrepositories which have already been added to the host machine.

Uninstall Docker Engine

  1. Uninstall the Docker Engine, CLI, and Containerd packages:

  2. Images, containers, volumes, or customized configuration files on your hostare not automatically removed. To delete all images, containers, andvolumes:

You must delete any edited configuration files manually.

Next steps

  • Continue to Post-installation steps for Linux.
  • Review the topics in Develop with Docker to learn how to build new applications using Docker.
requirements, apt, installation, centos, rpm, install, uninstall, upgrade, update

The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNN), the toolkit extends computer vision (CV) workloads across Intel® hardware, maximizing performance. The Intel® Distribution of OpenVINO™ toolkit includes the Intel® Deep Learning Deployment Toolkit.

This guide provides the steps for creating a Docker* image with Intel® Distribution of OpenVINO™ toolkit for Linux* and further installation.

System Requirements

Target Operating Systems

  • Ubuntu* 18.04 long-term support (LTS), 64-bit
  • Ubuntu* 20.04 long-term support (LTS), 64-bit
  • CentOS* 7.6
  • Red Hat* Enterprise Linux* 8.2 (64 bit)

Host Operating Systems

Docker
  • Linux with installed GPU driver and with Linux kernel supported by GPU driver

Prebuilt images

Prebuilt images are available on:

Use Docker* Image for CPU

  • Kernel reports the same information for all containers as for native application, for example, CPU, memory information.
  • All instructions that are available to host process available for process in container, including, for example, AVX2, AVX512. No restrictions.
  • Docker* does not use virtualization or emulation. The process in Docker* is just a regular Linux process, but it is isolated from external world on kernel level. Performance penalty is small.

Build a Docker* Image for CPU

You can use available Dockerfiles or generate a Dockerfile with your setting via DockerHub CI Framework for Intel® Distribution of OpenVINO™ toolkit. The Framework can generate a Dockerfile, build, test, and deploy an image with the Intel® Distribution of OpenVINO™ toolkit.

Run the Docker* Image for CPU

Run the image with the following command:

Use a Docker* Image for GPU

Build a Docker* Image for GPU

Prerequisites:

  • GPU is not available in container by default, you must attach it to the container.
  • Kernel driver must be installed on the host.
  • Intel® OpenCL™ runtime package must be included into the container.
  • In the container, non-root user must be in the video and render groups. To add a user to the render group, follow the Configuration Guide for the Intel® Graphics Compute Runtime for OpenCL™ on Ubuntu* 20.04.

Before building a Docker* image on GPU, add the following commands to a Dockerfile:

Ubuntu 18.04/20.04:

RUN useradd -ms /bin/bash -G video,users openvino &&
RUN apt-get update &&
apt-get install -y --no-install-recommends ocl-icd-libopencl1 &&
curl -L 'https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-gmmlib_19.3.2_amd64.deb' --output 'intel-gmmlib_19.3.2_amd64.deb' &&
curl -L 'https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-core_1.0.2597_amd64.deb' --output 'intel-igc-core_1.0.2597_amd64.deb' &&
curl -L 'https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-opencl_1.0.2597_amd64.deb' --output 'intel-igc-opencl_1.0.2597_amd64.deb' &&
curl -L 'https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-opencl_19.41.14441_amd64.deb' --output 'intel-opencl_19.41.14441_amd64.deb' &&
curl -L 'https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-ocloc_19.41.14441_amd64.deb' --output 'intel-ocloc_19.04.12237_amd64.deb' &&
ldconfig &&

CentOS 7/RHEL 8:

RUN useradd -ms /bin/bash -G video,users openvino &&
RUN groupmod -g 44 video
RUN yum update -y && yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&
yum update -y && yum install -y ocl-icd ocl-icd-devel &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-19.3.2-1.el7.x86_64.rpm/download -o intel-gmmlib-19.3.2-1.el7.x86_64.rpm &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm/download -o intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-core-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-core-1.0.2597-1.el7.x86_64.rpm &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm &&
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-opencl-19.41.14441-1.el7.x86_64.rpm/download -o intel-opencl-19.41.14441-1.el7.x86_64.rpm
ldconfig &&
yum remove -y epel-release

Run the Docker* Image for GPU

To make GPU available in the container, attach the GPU to the container using --device /dev/dri option and run the container:

docker run -it --rm --device /dev/dri <image_name>

NOTE: If your host system is Ubuntu 20, follow the Configuration Guide for the Intel® Graphics Compute Runtime for OpenCL™ on Ubuntu* 20.04.

Use a Docker* Image for Intel® Neural Compute Stick 2

Build and Run the Docker* Image for Intel® Neural Compute Stick 2

Known limitations:

  • Intel® Neural Compute Stick 2 device changes its VendorID and DeviceID during execution and each time looks for a host system as a brand new device. It means it cannot be mounted as usual.
  • UDEV events are not forwarded to the container by default it does not know about device reconnection.
  • Only one device per host is supported.

Use one of the following options as Possible solutions for Intel® Neural Compute Stick 2:

Option #1

  1. Get rid of UDEV by rebuilding libusb without UDEV support in the Docker* image (add the following commands to a Dockerfile):
    • Ubuntu 18.04/20.04:
      automake
      libtool
      udev'
      apt-get install -y --no-install-recommends ${BUILD_DEPENDENCIES} &&
      RUN curl -L https://github.com/libusb/libusb/archive/v1.0.22.zip --output v1.0.22.zip &&
      RUN ./bootstrap.sh &&
      make -j4
      WORKDIR /opt/libusb-1.0.22/libusb
      /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' &&
      /bin/mkdir -p '/usr/local/include/libusb-1.0' &&
      /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' &&
      RUN /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' &&
      cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/ &&
    • CentOS 7:
      automake
      unzip
      RUN yum update -y && yum install -y ${BUILD_DEPENDENCIES} &&
      yum clean all && rm -rf /var/cache/yum
      WORKDIR /opt
      RUN curl -L https://github.com/libusb/libusb/archive/v1.0.22.zip --output v1.0.22.zip &&
      RUN ./bootstrap.sh &&
      make -j4
      WORKDIR /opt/libusb-1.0.22/libusb
      /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' &&
      /bin/mkdir -p '/usr/local/include/libusb-1.0' &&
      /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' &&
      printf 'nexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/libn' >> /opt/intel/openvino_2021/bin/setupvars.sh
      WORKDIR /opt/libusb-1.0.22/
      RUN /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' &&
      cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/ &&
  2. Run the Docker* image:
    docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>

Option #2

Run container in the privileged mode, enable the Docker network configuration as host, and mount all devices to the container:

docker run -it --rm --privileged -v /dev:/dev --network=host <image_name>

NOTES:

  • It is not secure.
  • Conflicts with Kubernetes* and other tools that use orchestration and private networks may occur.

Use a Docker* Image for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs

Build Docker* Image for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs

To use the Docker container for inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs:

  1. Set up the environment on the host machine, that is going to be used for running Docker*. It is required to execute hddldaemon, which is responsible for communication between the HDDL plugin and the board. To learn how to set up the environment (the OpenVINO package or HDDL package must be pre-installed), see Configuration guide for HDDL device or Configuration Guide for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
  2. Prepare the Docker* image (add the following commands to a Dockerfile).
    • Ubuntu 18.04:
      RUN apt-get update &&
      libboost-filesystem1.65-dev
      libjson-c3 libxxf86vm-dev &&
    • Ubuntu 20.04:
      RUN apt-get update &&
      libboost-filesystem-dev
      libjson-c4
      rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
    • CentOS 7:
      RUN yum update -y && yum install -y
      boost-thread
      boost-system
      boost-date-time
      boost-atomic
      libXxf86vm-devel &&
  3. Run hddldaemon on the host in a separate terminal session using the following command:

Run the Docker* Image for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs

To run the built Docker* image for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, use the following command:

docker run -it --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp <image_name>

NOTES:

  • The device /dev/ion need to be shared to be able to use ion buffers among the plugin, hddldaemon and the kernel.
  • Since separate inference tasks share the same HDDL service communication interface (the service creates mutexes and a socket file in /var/tmp), /var/tmp needs to be mounted and shared among them.

In some cases, the ion driver is not enabled (for example, due to a newer kernel version or iommu incompatibility). lsmod | grep myd_ion returns empty output. To resolve, use the following command:

docker run -it --rm --net=host -v /var/tmp:/var/tmp –ipc=host <image_name>

NOTES:

  • When building docker images, create a user in the docker file that has the same UID and GID as the user which runs hddldaemon on the host.
  • Run the application in the docker with this user.
  • Alternatively, you can start hddldaemon with the root user on host, but this approach is not recommended.

Run Demos in the Docker* Image

To run the Security Barrier Camera Demo on a specific inference device, run the following commands with the root privileges (additional third-party dependencies will be installed):

CPU:

docker run -itu root:root --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp --device /dev/dri:/dev/dri --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>
/bin/bash -c 'apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d CPU -sample-options -no_show'

GPU:

docker run -itu root:root --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp --device /dev/dri:/dev/dri --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>
/bin/bash -c 'apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d GPU -sample-options -no_show'

MYRIAD:

docker run -itu root:root --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp --device /dev/dri:/dev/dri --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>
/bin/bash -c 'apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d MYRIAD -sample-options -no_show'

HDDL:

docker run -itu root:root --rm --device=/dev/ion:/dev/ion -v /var/tmp:/var/tmp --device /dev/dri:/dev/dri --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb <image_name>
/bin/bash -c 'apt update && apt install sudo && deployment_tools/demo/demo_security_barrier_camera.sh -d HDDL -sample-options -no_show'

Use a Docker* Image for FPGA

Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.

Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.

Docker Install Local Image

For instructions for previous releases with FPGA Support, see documentation for the 2020.4 version or lower.

Install Docker Image Locally

Troubleshooting

Install Docker Image From Tar

If you got proxy issues, please setup proxy settings for Docker. See the Proxy section in the Install the DL Workbench from Docker Hub* topic.

Additional Resources

Install Docker Image From Github

  • DockerHub CI Framework for Intel® Distribution of OpenVINO™ toolkit. The Framework can generate a Dockerfile, build, test, and deploy an image with the Intel® Distribution of OpenVINO™ toolkit. You can reuse available Dockerfiles, add your layer and customize the image of OpenVINO™ for your needs.
  • Intel® Distribution of OpenVINO™ toolkit home page: https://software.intel.com/en-us/openvino-toolkit
  • OpenVINO™ toolkit documentation: https://docs.openvinotoolkit.org
  • Intel® Neural Compute Stick 2 Get Started: https://software.intel.com/en-us/neural-compute-stick/get-started
  • Intel® Distribution of OpenVINO™ toolkit Docker Hub* home page: https://hub.docker.com/u/openvino