Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added into about NPU support #2345

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,12 @@ FROM $BASE_IMAGE as release
ARG INSTALL_RPMS_FROM_URL=
ARG INSTALL_DRIVER_VERSION="23.13.26032"
ARG GPU=0
ARG NPU=0
ARG NVIDIA=0
ENV DEBIAN_FRONTEND=noninteractive
ARG debug_bazel_flags=
LABEL bazel-build-flags=${debug_bazel_flags}
LABEL supported-devices="CPU=1 GPU=${GPU} NVIDIA=${NVIDIA}"
LABEL supported-devices="CPU=1 GPU=${GPU} NPU=${NPU} NVIDIA=${NVIDIA}"
ARG BASE_IMAGE
LABEL base-image=${BASE_IMAGE}
ENV PYTHONPATH=/ovms/lib/python
Expand Down Expand Up @@ -468,21 +469,19 @@ RUN apt-get update -y ; \
;; \
"23.13.26032") \
mkdir /tmp/gpu_deps && cd /tmp/gpu_deps ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.05.25593.11/libigdgmm12_22.3.0_amd64.deb ; \
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-core_1.0.13700.14_amd64.deb ; \
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.13700.14/intel-igc-opencl_1.0.13700.14_amd64.deb ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/intel-opencl-icd_23.13.26032.30_amd64.deb ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.13.26032.30/libigdgmm12_22.3.0_amd64.deb ; \
dpkg -i *.deb && rm -Rf /tmp/gpu_deps ; \
dpkg -i ./*.deb && rm -Rf /tmp/gpu_deps ; \
;; \
"23.22.26516") \
mkdir /tmp/gpu_deps && cd /tmp/gpu_deps ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.22.26516.18/intel-level-zero-gpu_1.3.26516.18_amd64.deb ; \
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.14062.11/intel-igc-core_1.0.14062.11_amd64.deb ; \
curl -L -O https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.14062.11/intel-igc-opencl_1.0.14062.11_amd64.deb ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.22.26516.18/intel-opencl-icd_23.22.26516.18_amd64.deb ; \
curl -L -O https://github.com/intel/compute-runtime/releases/download/23.22.26516.18/libigdgmm12_22.3.0_amd64.deb ; \
dpkg -i *.deb && rm -Rf /tmp/gpu_deps ; \
dpkg -i ./*.deb && rm -Rf /tmp/gpu_deps ; \
;; \

*) \
Expand All @@ -500,6 +499,14 @@ RUN apt-get update -y ; \
rm -rf /var/lib/apt/lists/* ; \
esac ; \
fi ; \
if [ "$NPU" == "1" ] ; then \
mkdir /tmp/npu_deps && cd /tmp/npu_deps ; \
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.1.0/intel-driver-compiler-npu_1.1.0.20231117-6904283384_ubuntu22.04_amd64.deb ; \
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.1.0/intel-fw-npu_1.1.0.20231117-6904283384_ubuntu22.04_amd64.deb ; \
curl -L -O https://github.com/intel/linux-npu-driver/releases/download/v1.1.0/intel-level-zero-npu_1.1.0.20231117-6904283384_ubuntu22.04_amd64.deb ; \
curl -L -O https://github.com/oneapi-src/level-zero/releases/download/v1.12.0/level-zero_1.12.0+u22.04_amd64.deb ; \
dpkg -i ./*.deb && rm -Rf /tmp/npu_deps ; \
fi ; \
apt-get clean ; \
rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* ; \
groupadd --gid 5000 ovms ; \
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ CHECK_COVERAGE ?=0
RUN_TESTS ?= 1
NVIDIA ?=0
GPU ?= 0
NPU ?= 0
BUILD_NGINX ?= 0
MEDIAPIPE_DISABLE ?= 0
PYTHON_DISABLE ?= 0
Expand Down Expand Up @@ -229,6 +230,7 @@ BUILD_ARGS = --build-arg http_proxy=$(HTTP_PROXY)\
--build-arg INSTALL_RPMS_FROM_URL=$(INSTALL_RPMS_FROM_URL)\
--build-arg INSTALL_DRIVER_VERSION=$(INSTALL_DRIVER_VERSION)\
--build-arg GPU=$(GPU)\
--build-arg NPU=$(NPU)\
--build-arg RELEASE_BASE_IMAGE=$(BASE_IMAGE_RELEASE)\
--build-arg JOBS=$(JOBS)\
--build-arg CAPI_FLAGS=$(CAPI_FLAGS)
Expand Down
22 changes: 21 additions & 1 deletion docs/accelerators.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,24 @@ docker run -it --gpus all -p 9000:9000 -v ${PWD}/models/public/resnet-50-tf:/opt

Check the supported [configuration parameters](https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/nvidia_plugin#supported-configuration-parameters) and [supported layers](https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/nvidia_plugin#supported-layers-and-limitations)

Currently the AUTO and MULTI virtual plugins do not support NVIDIA plugin as an alternative device.

## Using NPU device Plugin

OpenVINO Model Server can support using [NPU device](https://docs.openvino.ai/canonical/openvino_docs_install_guides_configurations_for_intel_npu.html)

Docker image with required dependencies can be build using this procedure:
The docker image of OpenVINO Model Server including support for NVIDIA can be built from sources

```bash
git clone https://github.com/openvinotoolkit/model_server.git
cd model_server
make release_image NPU=1 OV_USE_BINARY=1
cd ..
```

Example command to run container with NPU:
```bash
docker run --device /dev/accel -p 9000:9000 --group-add=$(stat -c "%g" /dev/dri/render* | head -n 1) -u $(id -u):$(id -g)
-v ${PWD}/models/public/resnet-50-tf:/opt/model openvino/model_server:latest --model_path /opt/model --model_name resnet --port 9000 --target_device NPU
```
Check more info about the [NPU driver for Linux](https://github.com/intel/linux-npu-driver).