Install Image Docker
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
So, Docker can be a perfect candidate for web app development and testing on Raspberry Pi. Of course, you can do other things like running a web server, proxy server or a database server etc. On Docker on Raspberry Pi single board computer. In this article, I am going to show you how to install Docker on Raspbian OS that runs on Raspberry Pi. While designed for web development, the PHP scripting language also provides general-purpose use.
Then simply install tzdata in your image. FROM ubuntu:18.04 RUN apt-get update && apt-get install -y tzdata # Testing command: Print the date. It will be in the timezone set from the compose file. CMD date To test: docker-compose build timezone. 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.
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
- 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
andrender
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.
Install Docker Image In Kubernetes
Before building a Docker* image on GPU, add the following commands to a Dockerfile:
Ubuntu 18.04/20.04:
CentOS 7/RHEL 8:
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:
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:
Install Docker Image Offline
Option #1
- Get rid of UDEV by rebuilding
libusb
without UDEV support in the Docker* image (add the following commands to aDockerfile
):- Ubuntu 18.04/20.04: automakelibtooludev'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 -j4WORKDIR /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: automakeunzipRUN yum update -y && yum install -y ${BUILD_DEPENDENCIES} &&yum clean all && rm -rf /var/cache/yumWORKDIR /optRUN curl -L https://github.com/libusb/libusb/archive/v1.0.22.zip --output v1.0.22.zip &&RUN ./bootstrap.sh &&make -j4WORKDIR /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.shWORKDIR /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/ &&
- Ubuntu 18.04/20.04:
- 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:
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:
- 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. - Prepare the Docker* image (add the following commands to a Dockerfile).
- Ubuntu 18.04: RUN apt-get update &&libboost-filesystem1.65-devlibjson-c3 libxxf86vm-dev &&
- Ubuntu 20.04: RUN apt-get update &&libboost-filesystem-devlibjson-c4rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
- CentOS 7: RUN yum update -y && yum install -yboost-threadboost-systemboost-date-timeboost-atomiclibXxf86vm-devel &&
- Ubuntu 18.04:
- 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:
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:
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:
GPU:
MYRIAD:
HDDL:
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.
For instructions for previous releases with FPGA Support, see documentation for the 2020.4 version or lower.
Troubleshooting
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
- 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
Estimated reading time: 5 minutes
Note: You may have been redirected to this page because there is no longera dynamically-linked Docker package for your Linux distribution.
If you want to try Docker or use it in a testing environment, but you’re not ona supported platform, you can try installing from static binaries. If possible,you should use packages built for your operating system, and use your operatingsystem’s package management system to manage Docker installation and upgrades.Be aware that 32-bit static binary archives do not include the Docker daemon.
Static binaries for the Docker daemon binary are only available for Linux (asdockerd
). Static binaries for the Docker client are available for Linux and macOS (as docker
).
This topic discusses binary installation for both Linux and macOS:
Install daemon and client binaries on Linux
Prerequisites
Before attempting to install Docker from binaries, be sure your host machinemeets the prerequisites:
- A 64-bit installation
- Version 3.10 or higher of the Linux kernel. The latest version of the kernelavailable for your platform is recommended.
iptables
version 1.4 or highergit
version 1.7 or higher- A
ps
executable, usually provided byprocps
or a similar package. - XZ Utils 4.9 or higher
- A properly mounted
cgroupfs
hierarchy; a single, all-encompassingcgroup
mountpoint is not sufficient. See Github issues#2683,#3485,#4568).
Secure your environment as much as possible
OS considerations
Enable SELinux or AppArmor if possible.
It is recommended to use AppArmor or SELinux if your Linux distribution supportseither of the two. This helps improve security and blocks certaintypes of exploits. Review the documentation for your Linux distribution forinstructions for enabling and configuring AppArmor or SELinux.
Security Warning
If either of the security mechanisms is enabled, do not disable it as awork-around to make Docker or its containers run. Instead, configure itcorrectly to fix any problems.
Docker daemon considerations
Enable
seccomp
security profiles if possible. SeeEnablingseccomp
for Docker.Enable user namespaces if possible. See theDaemon user namespace options.
Install static binaries
Download the static binary archive. Go tohttps://download.docker.com/linux/static/stable/(or change
stable
tonightly
ortest
),choose your hardware platform, and download the.tgz
file relating to theversion of Docker Engine you want to install.Extract the archive using the
tar
utility. Thedockerd
anddocker
binaries are extracted.Optional: Move the binaries to a directory on your executable path, suchas
/usr/bin/
. If you skip this step, you must provide the path to theexecutable when you invokedocker
ordockerd
commands.Start the Docker daemon:
If you need to start the daemon with additional options, modify the abovecommand accordingly or create and edit the file
/etc/docker/daemon.json
to add the custom configuration options.Verify that Docker is installed correctly by running the
hello-world
image.This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.
Install client binaries on macOS
Install Docker Image From Github
The macOS binary includes the Docker client only. It does not include thedockerd
daemon.
Download the static binary archive. Go tohttps://download.docker.com/mac/static/stable/x86_64/,(or change
stable
tonightly
ortest
),and download the.tgz
file relating to the version of Docker Engine you wantto install.Extract the archive using the
tar
utility. Thedocker
binary isextracted.Optional: Move the binary to a directory on your executable path, suchas
/usr/local/bin/
. If you skip this step, you must provide the path to theexecutable when you invokedocker
ordockerd
commands.Verify that Docker is installed correctly by running the
hello-world
image. The value of<hostname>
is a hostname or IP address running theDocker daemon and accessible to the client.This command downloads a test image and runs it in a container. When thecontainer runs, it prints an informational message and exits.
Upgrade static binaries
To upgrade your manual installation of Docker Engine, first stop anydockerd
or dockerd.exe
processes running locally, then follow theregular installation steps to install the new version on top of the existingversion.
Next steps
- Continue to Post-installation steps for Linux.
- Take a look at the Get started training modules to learn how to build an image and run it as a containerized application.
- Review the topics in Develop with Docker to learn how to build new applications using Docker.