[DOCS] Docker and GPU update for 23.0 (#17851)
* docker gpu update * ref fix * Update installing-openvino-docker-linux.md * fixes * Update DeviceDriverVersion.svg * Update docs/install_guides/configurations-for-intel-gpu.md Co-authored-by: Miłosz Żeglarski <milosz.zeglarski@intel.com> * Update docs/install_guides/configurations-for-intel-gpu.md Co-authored-by: Miłosz Żeglarski <milosz.zeglarski@intel.com> * fixes from review * Update configurations-for-intel-gpu.md * Update configurations-for-intel-gpu.md * Update deployment_migration.md --------- Co-authored-by: Miłosz Żeglarski <milosz.zeglarski@intel.com>
This commit is contained in:
@@ -21,7 +21,7 @@ Local Deployment Options
|
||||
|
||||
- using Debian / RPM packages - a recommended way for Linux operating systems;
|
||||
- using PIP package manager on PyPI - the default approach for Python-based applications;
|
||||
- using Docker images - if the application should be deployed as a Docker image, use a pre-built OpenVINO™ Runtime Docker image as a base image in the Dockerfile for the application container image. For more information about OpenVINO Docker images, refer to :doc:`Installing OpenVINO on Linux from Docker <openvino_docs_install_guides_installing_openvino_docker_linux>` and :doc:`Installing OpenVINO on Windows from Docker <openvino_docs_install_guides_installing_openvino_docker_windows>`.
|
||||
- using Docker images - if the application should be deployed as a Docker image, use a pre-built OpenVINO™ Runtime Docker image as a base image in the Dockerfile for the application container image. For more information about OpenVINO Docker images, refer to :doc:`Installing OpenVINO on Linux from Docker <openvino_docs_install_guides_installing_openvino_docker_linux>`
|
||||
|
||||
Furthermore, to customize your OpenVINO Docker image, use the `Docker CI Framework <https://github.com/openvinotoolkit/docker_ci>`__ to generate a Dockerfile and built the image.
|
||||
|
||||
@@ -43,7 +43,7 @@ The table below shows which distribution type can be used for what target operat
|
||||
* - RMP packages
|
||||
- Red Hat Enterprise Linux 8, 64-bit
|
||||
* - Docker images
|
||||
- Ubuntu 18.04 long-term support (LTS), 64-bit; Ubuntu 20.04 long-term support (LTS), 64-bit; Red Hat Enterprise Linux 8, 64-bit; Windows Server Core base LTSC 2019, 64-bit; Windows 10, version 20H2, 64-bit
|
||||
- Ubuntu 22.04 long-term support (LTS), 64-bit; Ubuntu 20.04 long-term support (LTS), 64-bit; Red Hat Enterprise Linux 8, 64-bit
|
||||
* - PyPI (PIP package manager)
|
||||
- See https://pypi.org/project/openvino
|
||||
* - :doc:`OpenVINO Deployment Manager <openvino_docs_install_guides_deployment_manager_tool>`
|
||||
|
||||
3
docs/_static/images/DeviceDriverVersion.PNG
vendored
3
docs/_static/images/DeviceDriverVersion.PNG
vendored
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c2f144de249eddf1c159cbc1a27a06ad40f57442efcf75f2f49cc02626fc6875
|
||||
size 13168
|
||||
3
docs/_static/images/DeviceDriverVersion.svg
vendored
Normal file
3
docs/_static/images/DeviceDriverVersion.svg
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d3a47af0e18856603b93a15d9415ddddd4ae06058cdfa0e18597e9eb861bf589
|
||||
size 51390
|
||||
@@ -25,7 +25,7 @@ To use sample applications, install OpenVINO Runtime via one of the following di
|
||||
|
||||
* Archive files (recommended) - :doc:`Linux <openvino_docs_install_guides_installing_openvino_from_archive_linux>` | :doc:`Windows <openvino_docs_install_guides_installing_openvino_from_archive_windows>` | :doc:`macOS <openvino_docs_install_guides_installing_openvino_from_archive_macos>`
|
||||
* :doc:`APT <openvino_docs_install_guides_installing_openvino_apt>` or :doc:`YUM <openvino_docs_install_guides_installing_openvino_yum>` for Linux
|
||||
* Docker image - :doc:`Linux <openvino_docs_install_guides_installing_openvino_docker_linux>` | :doc:`Windows <openvino_docs_install_guides_installing_openvino_docker_windows>`
|
||||
* Docker image - :doc:`Linux <openvino_docs_install_guides_installing_openvino_docker_linux>`
|
||||
* `Build from source <https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md>`__
|
||||
|
||||
Make sure that you also `install OpenCV <https://github.com/opencv/opencv/wiki/BuildOpenCV4OpenVINO>`__ , as it's required for running sample applications.
|
||||
|
||||
@@ -1,66 +1,126 @@
|
||||
# Configurations for Intel® Processor Graphics (GPU) with OpenVINO™ {#openvino_docs_install_guides_configurations_for_intel_gpu}
|
||||
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
.. _gpu guide:
|
||||
|
||||
|
||||
To use the OpenVINO™ GPU plugin and offload inference to Intel® Processor Graphics (GPU), Intel® Graphics Driver must be properly configured on your system.
|
||||
|
||||
If Intel® Graphics Driver is already installed and you would like to keep it, you can skip the installation steps below.
|
||||
To use the OpenVINO™ GPU plug-in and transfer the inference to the graphics of the Intel® processor (GPU), the Intel® graphics driver must be properly configured on the system.
|
||||
|
||||
Linux
|
||||
#####
|
||||
|
||||
To install the latest available **Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver** for your operating system,
|
||||
see its `installation guide on GitHub <https://github.com/intel/compute-runtime/releases/latest>`_.
|
||||
To use a GPU device for OpenVINO inference, you must meet the following prerequisites:
|
||||
|
||||
.. note::
|
||||
- Use a supported Linux kernel as per the `documentation <https://dgpu-docs.intel.com/driver/kernel-driver-types.html>`__
|
||||
- Install ``intel-i915-dkms`` and ``xpu-smi`` kernel modules as described in the `installation documentation <https://dgpu-docs.intel.com/driver/installation.html>`__
|
||||
- Install GPU Runtime packages:
|
||||
|
||||
If you are using RedHat 8, you can install the OpenCL library as a prerequisite by using the following command:
|
||||
``http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm``
|
||||
- `The Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver <https://github.com/intel/compute-runtime/releases/latest>`__
|
||||
- `Intel Graphics Memory Management Library <https://github.com/intel/gmmlib>`__
|
||||
- `Intel® Graphics Compiler for OpenCL™ <https://github.com/intel/intel-graphics-compiler>`__
|
||||
- `OpenCL ICD loader package <https://github.com/KhronosGroup/OpenCL-ICD-Loader>`__
|
||||
|
||||
.. _wsl-instal:
|
||||
|
||||
Depending on your operating system, there may be different methods to install the above packages. Below are the instructions on how to install the packages on supported Linux distributions.
|
||||
|
||||
You may consider installing one of the earlier versions of the driver, based on your particular setup needs.
|
||||
.. tab-set::
|
||||
|
||||
For instructions and recommendations on the installation of a specific GPU driver release, as well as the list of supported hardware platforms, refer to the `Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver GitHub home page <https://github.com/intel/compute-runtime/>`__.
|
||||
.. tab-item:: Ubuntu 22.04 LTS
|
||||
:sync: ubuntu22
|
||||
|
||||
For instructions specific to discrete graphics platforms, refer to `the dgpu guide <https://dgpu-docs.intel.com/installation-guides/index.html>`__,
|
||||
including installation guides for Intel® Arc™ A-Series Graphics, Intel® Data Center GPU Flex Series, Intel® Data Center GPU MAX Series, Intel® processor graphics Gen12, and Intel® Iris Xe MAX codename DG1.
|
||||
Download and install the `deb` packages published `here <https://github.com/intel/compute-runtime/releases/latest>`__ and install the apt package `ocl-icd-libopencl1` with the OpenCl ICD loader.
|
||||
|
||||
Alternatively, you can add the apt repository by following the `installation guide <https://dgpu-docs.intel.com/driver/installation.html#ubuntu-install-steps>`__. Then install the `ocl-icd-libopencl1`, `intel-opencl-icd`, `intel-level-zero-gpu` and `level-zero` apt packages:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
apt-get install -y ocl-icd-libopencl1 intel-opencl-icd intel-level-zero-gpu level-zero
|
||||
|
||||
.. tab-item:: Ubuntu 20.04 LTS
|
||||
:sync: ubuntu20
|
||||
|
||||
Ubuntu 20.04 LTS is not updated with the latest driver versions. You can install the updated versions up to the version 22.43 from apt:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
apt-get update && apt-get install -y --no-install-recommends curl gpg gpg-agent && \
|
||||
curl https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
|
||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-legacy main' | tee /etc/apt/sources.list.d/intel.gpu.focal.list && \
|
||||
apt-get update
|
||||
apt-get update && apt-get install -y --no-install-recommends intel-opencl-icd intel-level-zero-gpu level-zero
|
||||
|
||||
Alternatively, download older `deb` version from `here <https://github.com/intel/compute-runtime/releases>`__. Note that older driver version might not include some of the bug fixes and might be not supported on some latest platforms. Check the supported hardware for the versions you are installing.
|
||||
|
||||
.. tab-item:: RedHat UBI 8
|
||||
:sync: redhat8
|
||||
|
||||
Follow the `guide <https://dgpu-docs.intel.com/driver/installation.html#rhel-install-steps>`__ to add Yum repository.
|
||||
|
||||
Install following packages:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
yum install intel-opencl level-zero intel-level-zero-gpu intel-igc-core intel-igc-cm intel-gmmlib intel-ocloc
|
||||
|
||||
Install the OpenCL ICD Loader via:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm
|
||||
|
||||
.. _gpu guide windows:
|
||||
|
||||
|
||||
Windows
|
||||
#######
|
||||
|
||||
To install the Intel Graphics Driver for Windows on your system, follow the `driver installation guide <https://www.intel.com/content/www/us/en/support/articles/000005629/graphics.html>`_.
|
||||
To install the Intel Graphics Driver for Windows, follow the `driver installation instructions <https://www.intel.com/content/www/us/en/support/articles/000005629/graphics.html>`_.
|
||||
|
||||
To check if you have this driver installed:
|
||||
To check if the driver has been installed:
|
||||
|
||||
1. Type **device manager** in your **Search Windows** box and press Enter. The **Device Manager** opens.
|
||||
2. Click the drop-down arrow to view the **Display adapters**. You can see the adapter that is installed in your computer:
|
||||
1. Type **device manager** in the **Search Windows** field and press Enter. **Device Manager** will open.
|
||||
2. Click the drop-down arrow to display **Display Adapters**. You can see the adapter that is installed in your computer:
|
||||
|
||||
.. image:: _static/images/DeviceManager.PNG
|
||||
:width: 400
|
||||
|
||||
3. Right-click the adapter name and select **Properties**.
|
||||
4. Click the **Driver** tab to see the driver version.
|
||||
3. Right-click on the adapter name and select **Properties**.
|
||||
4. Click the **Driver** tab to view the driver version.
|
||||
|
||||
.. image:: _static/images/DeviceDriverVersion.PNG
|
||||
.. image:: _static/images/DeviceDriverVersion.svg
|
||||
:width: 400
|
||||
|
||||
You are done updating your device driver and ready to use your GPU.
|
||||
Your device driver has been updated and is now ready to use your GPU.
|
||||
|
||||
Additional info
|
||||
###############
|
||||
Windows Subsystem for Linux (WSL)
|
||||
#################################
|
||||
|
||||
For your reference, the following versions of Intel® Graphics Driver were used in the OpenVINO internal validation:
|
||||
WSL allows developers to run a GNU/Linux development environment for the Windows operating system. Using the GPU in WSL is very similar to a native Linux environment.
|
||||
|
||||
.. note::
|
||||
|
||||
Make sure your Intel graphics driver is updated to version **30.0.100.9955** or later. You can download and install the latest GPU host driver `here <https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html>`__.
|
||||
|
||||
Below are the required steps to make it work with OpenVINO:
|
||||
|
||||
- Install the GPU drivers as described :ref:`above <wsl-instal>`.
|
||||
- Run the following commands in PowerShell to view the latest version of WSL2:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
wsl --update
|
||||
wsl --shutdown
|
||||
|
||||
- When booting Ubuntu 20.04 or Ubuntu 22.04, install the same drivers as described above in the Linux section
|
||||
|
||||
.. note::
|
||||
|
||||
In WSL, the GPU device is accessed via the character device `/dev/drx`, while for native Linux OS it is accessed via `/dev/dri`.
|
||||
|
||||
Additional Resources
|
||||
####################
|
||||
|
||||
The following Intel® Graphics Driver versions were used during OpenVINO's internal validation:
|
||||
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| Operation System | Driver version |
|
||||
@@ -80,24 +140,11 @@ For your reference, the following versions of Intel® Graphics Driver were used
|
||||
What’s Next?
|
||||
############
|
||||
|
||||
You can try out the toolkit with:
|
||||
|
||||
|
||||
* `Python Quick Start Example <notebooks/201-vision-monodepth-with-output.html>`_ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
Visit the :ref:`Tutorials <notebook tutorials>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <notebooks/205-vision-background-removal-with-output.html>`__
|
||||
|
||||
* `C++ Quick Start Example <openvino_docs_get_started_get_started_demos.html>`__ for step-by-step instructions on building and running a basic image classification C++ application.
|
||||
|
||||
Visit the :ref:`Samples <code samples>` page for other C++ example applications to get you started with OpenVINO, such as:
|
||||
|
||||
* `Basic object detection with the Hello Reshape SSD C++ sample <openvino_inference_engine_samples_hello_reshape_ssd_README.html>`_
|
||||
* `Automatic speech recognition C++ sample <openvino_inference_engine_samples_speech_sample_README.html>`_
|
||||
|
||||
* :doc:`GPU Device <openvino_docs_OV_UG_supported_plugins_GPU>`
|
||||
* :doc:`Install Intel® Distribution of OpenVINO™ toolkit for Linux from a Docker Image <openvino_docs_install_guides_installing_openvino_docker_linux>`
|
||||
* `Docker CI framework for Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/README.md>`__
|
||||
* `Get Started with DockerHub CI for Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/get-started.md>`__
|
||||
* `Dockerfiles with Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/dockerfiles/README.md>`__
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
@@ -1,180 +1,32 @@
|
||||
# Install Intel® Distribution of OpenVINO™ toolkit for Linux from a Docker Image {#openvino_docs_install_guides_installing_openvino_docker_linux}
|
||||
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
This guide provides steps on creating a Docker image with Intel® Distribution of OpenVINO™ toolkit for Linux and using the image on different devices.
|
||||
Supported operating systems for the Docker Base image:
|
||||
|
||||
System Requirements
|
||||
###################
|
||||
- Ubuntu 22.04 LTS
|
||||
- Ubuntu 20.04 LTS
|
||||
- RedHat UBI 8
|
||||
|
||||
.. tab:: Target Operating Systems with Python Versions
|
||||
|
||||
+----------------------------------------------+-------------------------+
|
||||
| Operating System | Included Python Version |
|
||||
+==============================================+=========================+
|
||||
| Ubuntu 18.04 long-term support (LTS), 64-bit | 3.8 |
|
||||
+----------------------------------------------+-------------------------+
|
||||
| Ubuntu 20.04 long-term support (LTS), 64-bit | 3.8 |
|
||||
+----------------------------------------------+-------------------------+
|
||||
| Red Hat Enterprise Linux 8, 64-bit | 3.8 |
|
||||
+----------------------------------------------+-------------------------+
|
||||
The `Docker CI framework <https://github.com/openvinotoolkit/docker_ci/>`__ can generate a Dockerfile, build, test, and deploy an image using the Intel® Distribution of OpenVINO™ toolkit. You can reuse available Dockerfiles, add your layer and customize the OpenVINO™ image to your needs. You can get started easily with pre-built and published docker images. Details on how to get started can be found `here <https://github.com/openvinotoolkit/docker_ci/blob/master/get-started.md>`__.
|
||||
|
||||
.. tab:: Host Operating Systems
|
||||
To start using them, the following conditions must be met:
|
||||
|
||||
* Linux
|
||||
* Windows Subsystem for Linux 2 (WSL2) on CPU or GPU
|
||||
* macOS on CPU only
|
||||
|
||||
To launch a Linux image on WSL2 when trying to run inferences on a GPU, make sure that the following requirements are met:
|
||||
|
||||
* Only Windows 10 with 21H2 update or above installed and Windows 11 are supported.
|
||||
* Intel GPU driver for Windows, version 30.0.100.9684 or newer needs to be installed. For more details, refer to
|
||||
`this article at intel.com <https://www.intel.com/content/www/us/en/artificial-intelligence/harness-the-power-of-intel-igpu-on-your-machine.html#articleparagraph_983312434>`__.
|
||||
* Currently, the Docker images contain preinstalled recommended version of OpenCL Runtime with WSL2 support.
|
||||
- Linux OS or Windows Subsystem for Linux (WSL2)
|
||||
- Installed docker engine or compatible container engine
|
||||
- Permissions to run containers (sudo or docker group membership)
|
||||
|
||||
|
||||
Installation
|
||||
#############
|
||||
|
||||
* Use a prebuilt image:
|
||||
|
||||
1. `Get a prebuilt image from provided sources <#getting-a-prebuilt-image-from-provided-sources>`__
|
||||
2. `Run the image on different devices <#running-the-docker-image-on-different-devices>`__
|
||||
3. `Run samples in the Docker image <#running-samples-in-docker-image>`__
|
||||
|
||||
* If you want to customize your image, you can also build a Docker image manually:
|
||||
|
||||
1. `Prepare a Dockerfile <#preparing-a-dockerfile>`__
|
||||
2. `Configure the Docker image <#configuring-the-image-for-different-devices>`__
|
||||
3. `Run the image on different devices <#running-the-docker-image-on-different-devices>`__
|
||||
4. `Run samples in the Docker image <#running-samples-in-docker-image>`__
|
||||
|
||||
|
||||
Getting a Prebuilt Image from Provided Sources
|
||||
++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
You can find prebuilt images on:
|
||||
|
||||
- `Docker Hub <https://hub.docker.com/u/openvino>`__
|
||||
- `Red Hat Quay.io <https://quay.io/organization/openvino>`__
|
||||
- `Red Hat Ecosystem Catalog (runtime image) <https://catalog.redhat.com/software/containers/intel/openvino-runtime/606ff4d7ecb5241699188fb3>`__
|
||||
- `Red Hat Ecosystem Catalog (development image) <https://catalog.redhat.com/software/containers/intel/openvino-dev/613a450dc9bc35f21dc4a1f7>`__
|
||||
- `Azure Marketplace <https://azuremarketplace.microsoft.com/en-us/marketplace/apps/intel_corporation.openvino>`__
|
||||
|
||||
Preparing a Dockerfile
|
||||
++++++++++++++++++++++
|
||||
|
||||
You can use the `available Dockerfiles on GitHub <https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles>`__
|
||||
or generate a Dockerfile with your settings via `DockerHub CI Framework <https://github.com/openvinotoolkit/docker_ci>`__
|
||||
which can generate a Dockerfile, build, test and deploy an image with the Intel® Distribution of OpenVINO™ toolkit.
|
||||
You can also try our `Tutorials <https://github.com/openvinotoolkit/docker_ci/tree/master/docs/tutorials>`__
|
||||
which demonstrate the usage of Docker containers with OpenVINO.
|
||||
|
||||
Configuring the Image for Different Devices
|
||||
+++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
If you want to run inference on a CPU no extra configuration is needed.
|
||||
Go to `Run the image on different devices <#running-the-docker-image-on-different-devices>`__ for the next step.
|
||||
|
||||
If you want to run inference on a GPU, follow the instructions provided in the guide on
|
||||
:doc:`Configuration for Intel GPU <openvino_docs_install_guides_configurations_for_intel_gpu>`
|
||||
|
||||
|
||||
Running the Docker Image on Different Devices
|
||||
+++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Running the Image on CPU
|
||||
-------------------------
|
||||
|
||||
Run the Docker image with the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run -it --rm <image_name>
|
||||
|
||||
|
||||
Note the following:
|
||||
|
||||
- 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 loss is minor.
|
||||
|
||||
|
||||
Running the Image on GPU
|
||||
-------------------------
|
||||
OpenVINO's `Docker <https://docs.docker.com/>`__ and `Bare Metal <https://docs.openvino.ai/2023.0/ovms_docs_deploying_server.html#doxid-ovms-docs-deploying-server>` distributions are identical, so the documentation applies to both.
|
||||
|
||||
.. note::
|
||||
|
||||
Only Intel® integrated graphics are supported.
|
||||
|
||||
Note the following:
|
||||
The OpenVINO development environment in a docker container is also available in the `notebook repository <https://github.com/openvinotoolkit/openvino_notebooks>`__ . It can be implemented in `OpenShift RedHat OpenData Science (RHODS) <https://github.com/openvinotoolkit/operator/blob/main/docs/notebook_in_rhods.md>`__.
|
||||
|
||||
- GPU is not available in the container by default. You must attach it to the container.
|
||||
- Kernel driver must be installed on the host.
|
||||
- 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 <https://github.com/openvinotoolkit/docker_ci/blob/master/configure_gpu_ubuntu20.md>`__.
|
||||
|
||||
To make GPU available in the container, attach the GPU to the container using ``--device /dev/dri`` option and run the container:
|
||||
|
||||
* Ubuntu 18 or RHEL 8:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
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 <https://github.com/openvinotoolkit/docker_ci/blob/master/configure_gpu_ubuntu20.md>`__.
|
||||
|
||||
* WSL2:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run -it --rm --device /dev/dxg --volume /usr/lib/wsl:/usr/lib/wsl <image_name>
|
||||
|
||||
.. note::
|
||||
|
||||
To launch a Linux image on WSL2, make sure that the additional `System Requirements <system-requirements>`__ are met.
|
||||
|
||||
|
||||
Running Samples in Docker Image
|
||||
###############################
|
||||
|
||||
To run the ``Hello Classification Sample`` on a specific inference device, run the following commands:
|
||||
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: CPU
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run -it --rm <image_name>
|
||||
/bin/bash -c "cd ~ && omz_downloader --name googlenet-v1 --precisions FP16 && omz_converter --name googlenet-v1 --precision FP16 && curl -O https://storage.openvinotoolkit.org/data/test_data/images/car_1.bmp && python3 /opt/intel/openvino/samples/python/hello_classification/hello_classification.py public/googlenet-v1/FP16/googlenet-v1.xml car_1.bmp CPU"
|
||||
|
||||
.. tab-item:: GPU
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run -itu root:root --rm --device /dev/dri:/dev/dri <image_name>
|
||||
/bin/bash -c "omz_downloader --name googlenet-v1 --precisions FP16 && omz_converter --name googlenet-v1 --precision FP16 && curl -O https://storage.openvinotoolkit.org/data/test_data/images/car_1.bmp && python3 samples/python/hello_classification/hello_classification.py public/googlenet-v1/FP16/googlenet-v1.xml car_1.bmp GPU"
|
||||
|
||||
|
||||
Additional Resources
|
||||
###############################
|
||||
|
||||
- `DockerHub CI Framework <https://github.com/openvinotoolkit/docker_ci>`__ 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 Installation Selector Tool <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>`__
|
||||
ore information about Docker CI for Intel® Distribution of OpenVINO™ toolset can be found `here <https://github.com/openvinotoolkit/docker_ci/blob/master/README.md>`__
|
||||
|
||||
* `Docker CI framework for Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/README.md>`__
|
||||
* `Get Started with DockerHub CI for Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/get-started.md>`__
|
||||
* `Dockerfiles with Intel® Distribution of OpenVINO™ toolkit <https://github.com/openvinotoolkit/docker_ci/blob/master/dockerfiles/README.md>`__
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
# Install Intel® Distribution of OpenVINO™ toolkit for Windows from Docker Image {#openvino_docs_install_guides_installing_openvino_docker_windows}
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
This guide provides steps for creating a Docker image with Intel® Distribution of OpenVINO™ toolkit for Windows and using the Docker image on different devices.
|
||||
|
||||
.. _system-requirements-docker-windows:
|
||||
|
||||
System Requirements
|
||||
####################
|
||||
|
||||
.. tab:: Target Operating System with Python Versions
|
||||
|
||||
+------------------------------------+--------------------------+
|
||||
| Operating System | Supported Python Version |
|
||||
+====================================+==========================+
|
||||
| Windows Server Core base LTSC 2019 | 3.8 |
|
||||
+------------------------------------+--------------------------+
|
||||
| Windows 10, version 20H2 | 3.8 |
|
||||
+------------------------------------+--------------------------+
|
||||
|
||||
.. tab:: Host Operating Systems
|
||||
|
||||
* Windows 10, 64-bit Pro, Enterprise or Education (1607 Anniversary Update, Build 14393 or later) editions
|
||||
* Windows Server 2016 or higher
|
||||
|
||||
|
||||
Additional Requirements for GPU
|
||||
+++++++++++++++++++++++++++++++
|
||||
|
||||
To use GPU Acceleration in Windows containers, make sure that the following requirements for Windows host, OpenVINO and Docker are met:
|
||||
|
||||
- `Windows requirements <https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/gpu-acceleration>`__:
|
||||
|
||||
- The container host must be running Windows Server 2019 or Windows 10 of version 1809 or higher.
|
||||
- The container base image must be ``mcr.microsoft.com/windows:1809`` or higher. Windows Server Core and Nano Server container images are not currently supported.
|
||||
- The container host must be running Docker Engine 19.03 or higher.
|
||||
- The container host must have GPU running display drivers of version WDDM 2.5 or higher.
|
||||
|
||||
- GPU requirement for OpenVINO: Intel Graphics Driver for Windows of version 15.65 or higher.
|
||||
- `Docker isolation mode requirements <https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container>`__:
|
||||
|
||||
- Windows host and container version tags must match.
|
||||
- `Windows host and container isolation process support <https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility>`__.
|
||||
|
||||
Installation Flow
|
||||
####################
|
||||
|
||||
There are two ways to install OpenVINO with Docker. You can choose either of them according to your needs:
|
||||
|
||||
* Use a prebuilt image. Do the following steps:
|
||||
|
||||
1. `Get a prebuilt image from provided sources <#getting-a-prebuilt-image-from-provided-sources>`__.
|
||||
2. `Run the image on different devices <#running-the-docker-image-on-different-devices>`__.
|
||||
|
||||
* If you want to customize your image, you can also build a Docker image manually by using the following steps:
|
||||
|
||||
1. `Prepare a Dockerfile <#preparing-a-dockerfile>`__.
|
||||
2. `Configure the Docker image <#configuring-the-docker-image-for-different-devices>`__.
|
||||
3. `Run the image on different devices <#running-the-docker-image-on-different-devices>`__.
|
||||
|
||||
Getting a Prebuilt Image from Provided Sources
|
||||
##############################################
|
||||
|
||||
You can find prebuilt images on:
|
||||
|
||||
- `Docker Hub <https://hub.docker.com/u/openvino>`__
|
||||
- `Azure Marketplace <https://azuremarketplace.microsoft.com/en-us/marketplace/apps/intel_corporation.openvino>`__
|
||||
|
||||
Preparing a Dockerfile
|
||||
######################
|
||||
|
||||
You can use the `available Dockerfiles on GitHub <https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles>`__ or generate a Dockerfile with your settings via `DockerHub CI Framework <https://github.com/openvinotoolkit/docker_ci>`__ which can generate a Dockerfile, build, test and deploy an image with the Intel® Distribution of OpenVINO™ toolkit.
|
||||
|
||||
Configuring the Docker Image for Different Devices
|
||||
##################################################
|
||||
|
||||
Installing Additional Dependencies for CPU
|
||||
++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Installing CMake
|
||||
----------------
|
||||
|
||||
To add CMake to the image, add the following commands to the Dockerfile:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
RUN powershell.exe -Command `
|
||||
Invoke-WebRequest -URI https://cmake.org/files/v3.14/cmake-3.14.7-win64-x64.msi -OutFile %TMP%\\cmake-3.14.7-win64-x64.msi ; `
|
||||
Start-Process %TMP%\\cmake-3.14.7-win64-x64.msi -ArgumentList '/quiet /norestart' -Wait ; `
|
||||
Remove-Item %TMP%\\cmake-3.14.7-win64-x64.msi -Force
|
||||
|
||||
RUN SETX /M PATH "C:\Program Files\CMake\Bin;%PATH%"
|
||||
|
||||
|
||||
In case of proxy issues, please add the ``ARG HTTPS_PROXY`` and ``-Proxy %%HTTPS_PROXY%`` settings to the ``powershell.exe`` command to the Dockerfile. Then build a Docker image:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
docker build . -t <image_name> `
|
||||
--build-arg HTTPS_PROXY=<https://your_proxy_server:port>
|
||||
|
||||
|
||||
Installing Microsoft Visual Studio Build Tools
|
||||
----------------------------------------------
|
||||
|
||||
You can add Microsoft Visual Studio Build Tools to a Windows OS Docker image using the `offline <https://docs.microsoft.com/en-us/visualstudio/installcreate-an-offline-installation-of-visual-studio?view=vs-2019>`__ or `online <https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019>`__ installers for Build Tools.
|
||||
|
||||
Microsoft Visual Studio Build Tools are licensed as a supplement your existing Microsoft Visual Studio license.
|
||||
|
||||
Any images built with these tools should be for your personal use or for use in your organization in accordance with your existing Visual Studio and Windows licenses.
|
||||
|
||||
To add MSBuild 2019 to the image, add the following commands to the Dockerfile:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
RUN powershell.exe -Command Invoke-WebRequest -URI https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile %TMP%\\vs_buildtools.exe
|
||||
|
||||
RUN %TMP%\\vs_buildtools.exe --quiet --norestart --wait --nocache `
|
||||
--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" `
|
||||
--add Microsoft.VisualStudio.Workload.MSBuildTools `
|
||||
--add Microsoft.VisualStudio.Workload.UniversalBuildTools `
|
||||
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended `
|
||||
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
|
||||
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
|
||||
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
|
||||
--remove Microsoft.VisualStudio.Component.Windows81SDK || IF "%ERRORLEVEL%"=="3010" EXIT 0 && powershell set-executionpolicy remotesigned
|
||||
|
||||
|
||||
In case of proxy issues, please use the `offline installer for Build Tools <https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studioview=vs-2019>`__.
|
||||
|
||||
Configuring the Image for GPU
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
.. note::
|
||||
|
||||
Since GPU is not supported in `prebuilt images <#getting-a-prebuilt-image-from-provided-sources>`__ or `default Dockerfiles <https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles>`__, you must make sure the Additional Requirements for GPU in `System Requirements <#system-requirements>`__ are met, and do the following steps to build the image manually.
|
||||
|
||||
1. Reuse one of `available Dockerfiles <https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles>`__. You can also use your own Dockerfile.
|
||||
2. Check your `Windows host and container isolation process compatibility <https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility>`__.
|
||||
3. Find the appropriate Windows container base image on `DockerHub <https://hub.docker.com/_/microsoft-windows>`__ and set up your host/container version in the ``FROM`` Dockerfile instruction.
|
||||
|
||||
For example, in the ``openvino_c_dev_<version>.dockerfile``, change:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS ov_base
|
||||
|
||||
to:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
FROM mcr.microsoft.com/windows:20H2
|
||||
|
||||
|
||||
4. Build the Docker image by running the following command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
docker build --build-arg package_url=<OpenVINO pkg> -f <Dockerfile> -t <image_name> .
|
||||
|
||||
|
||||
5. Copy ``OpenCL.dll`` from your ``C:\Windows\System32`` host folder to any ``temp`` directory:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
mkdir C:\tmp
|
||||
copy C:\Windows\System32\OpenCL.dll C:\tmp
|
||||
|
||||
|
||||
Running the Docker Image on Different Devices
|
||||
#############################################
|
||||
|
||||
Running the Image on CPU
|
||||
++++++++++++++++++++++++
|
||||
|
||||
To start the interactive session, run the following command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
docker run -it --rm <image_name>
|
||||
|
||||
|
||||
If you want to try some samples, run the image with the following command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
docker run -it --rm <image_name>
|
||||
cmd /S /C "omz_downloader --name googlenet-v1 --precisions FP16 && omz_converter --name googlenet-v1 --precision FP16 && curl -kO https://storage.openvinotoolkit.org/data/test_data/images/car_1.bmp && python samples\python\hello_classification\hello_classification.py public\googlenet-v1\FP16\googlenet-v1.xml car_1.bmp CPU"
|
||||
|
||||
|
||||
Running the Image on GPU
|
||||
++++++++++++++++++++++++
|
||||
|
||||
.. note::
|
||||
|
||||
Since GPU is not supported in `prebuilt images <#getting-a-prebuilt-image-from-provided-sources>`__ or `default Dockerfiles <https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles>`__, you must make sure the Additional Requirements for GPU in `System Requirements <#system-requirements>`__ are met, and `configure and build the image manually <#configuring-the-image-for-gpu>`__ before you can run inferences on a GPU.
|
||||
|
||||
|
||||
1. To try inference on a GPU, run the image with the following command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
docker run -it --rm -u ContainerAdministrator --isolation process --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599 -v C:\Windows\System32\DriverStore\FileRepository\iigd_dch. inf_amd64_518f2921ba495409:C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409 -v C:\tmp:C:\tmp <image_name>
|
||||
|
||||
|
||||
where
|
||||
|
||||
- ``--device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599`` is a reserved interface class GUID for a GPU device.
|
||||
- ``C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409`` is the path to OpenCL driver home directory. To find it on your PC, run the ``C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_*`` regular expression.
|
||||
- ``C:\tmp`` is the folder with the copy of ``OpenCL.dll`` from your ``C:\Windows\System32`` host folder.
|
||||
|
||||
2. Copy ``OpenCL.dll`` to the ``C:\Windows\System32`` folder inside the container and set appropriate registry entry. Now you can run inference on a GPU device:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
copy C:\tmp\OpenCL.dll C:\Windows\System32\ && reg add "HKLM\SOFTWARE\Khronos\OpenCL\Vendors" /v "C:\Windows\System32\DriverStore\FileRepository\iigd_dch. inf_amd64_518f2921ba495409\ocl\bin\x64\intelocl64.dll" /t REG_DWORD /d 0
|
||||
|
||||
|
||||
For example, run the ``Hello Classification Python`` sample with the following command:
|
||||
|
||||
.. code-block:: bat
|
||||
|
||||
omz_downloader --name googlenet-v1 --precisions FP16 && omz_converter --name googlenet-v1 --precision FP16 && curl -kO https://storage.openvinotoolkit.org/data/test_data/images/ car_1.bmp && python samples\python\hello_classification\hello_classification.py public\googlenet-v1\FP16\googlenet-v1.xml car_1.bmp GPU
|
||||
|
||||
|
||||
Additional Resources
|
||||
####################
|
||||
|
||||
- `DockerHub CI Framework <https://github.com/openvinotoolkit/docker_ci>`__ 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 <https://software.intel.com/en-us/openvino-toolkit>`__
|
||||
- `OpenVINO Installation Selector Tool <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>`__
|
||||
|
||||
@endsphinxdirective
|
||||
@@ -9,7 +9,6 @@
|
||||
Use Archive <openvino_docs_install_guides_installing_openvino_from_archive_windows>
|
||||
Use PyPI <openvino_docs_install_guides_installing_openvino_pip>
|
||||
Use Conda Forge <openvino_docs_install_guides_installing_openvino_conda>
|
||||
Use Docker <openvino_docs_install_guides_installing_openvino_docker_windows>
|
||||
|
||||
|
||||
If you want to install OpenVINO™ Runtime on Windows, you have the following options:
|
||||
@@ -17,7 +16,6 @@ If you want to install OpenVINO™ Runtime on Windows, you have the following op
|
||||
* :doc:`Install OpenVINO Runtime from an Archive File <openvino_docs_install_guides_installing_openvino_from_archive_windows>`
|
||||
* :doc:`Install OpenVINO Runtime using PyPI <openvino_docs_install_guides_installing_openvino_pip>`
|
||||
* :doc:`Install OpenVINO Runtime using Conda Forge <openvino_docs_install_guides_installing_openvino_conda>`
|
||||
* :doc:`Install OpenVINO using Docker <openvino_docs_install_guides_installing_openvino_docker_windows>`
|
||||
|
||||
For a full selection of distribution channels,
|
||||
see the `OpenVINO Installation Selector Tool <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>`__
|
||||
|
||||
Reference in New Issue
Block a user