Skip to content

Commit

Permalink
U20 2024 2 ovms update (#75)
Browse files Browse the repository at this point in the history
* OV 2024.2 release

* Fix numpy
  • Loading branch information
rasapala authored Jun 25, 2024
1 parent f99778c commit a46cf12
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 21 deletions.
16 changes: 7 additions & 9 deletions Dockerfile.openvino
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libopencv-calib3d-dev \
libopencv-features2d-dev \
software-properties-common && \
add-apt-repository -y ppa:openjdk-r/ppa && \
apt-get update && apt-get install -y openjdk-8-jdk && \
apt-get install -y mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev && \
apt-get install -y mesa-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# python setup.py requirements
RUN pip3 install --upgrade setuptools
RUN pip3 install attrs matplotlib wheel future absl-py numpy opencv-contrib-python tensorflow==2.9.0 protobuf==3.20.1 six==1.14.0 tf_slim
RUN pip3 install attrs matplotlib wheel future absl-py opencv-contrib-python numpy==1.24.4 tensorflow==2.9.0 protobuf==3.20.1 six==1.14.0 tf_slim

RUN ln -s /usr/bin/python3 /usr/bin/python
RUN apt-get update && apt-get install -y protobuf-compiler
Expand All @@ -76,7 +74,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
vim \
ca-certificates \
python3 \
python3-numpy \
pip \
libopencv-core-dev \
libopencv-highgui-dev \
Expand All @@ -85,7 +82,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
libopencv-imgproc-dev \
libopencv-video-dev \
build-essential \
libjson-c4 \
unzip

# install ovms_lib requirements
Expand All @@ -105,7 +101,7 @@ azel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
rm -f /bazel/installer.sh

#OPENVINO
ARG DLDT_PACKAGE_URL=https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.0/linux/l_openvino_toolkit_ubuntu20_2023.0.0.10926.b4452d56304_x86_64.tgz
ARG DLDT_PACKAGE_URL=https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.2/linux/l_openvino_toolkit_ubuntu20_2024.2.0.15519.5c0f38f83f6_x86_64.tgz
# OV toolkit package
RUN wget -nv $DLDT_PACKAGE_URL && \
mkdir /opt/intel && \
Expand All @@ -117,7 +113,9 @@ RUN wget -nv $DLDT_PACKAGE_URL && \
WORKDIR /boost
# hadolint ignore=DL3003
RUN wget -nv https://sourceforge.net/projects/boost/files/boost/1.69.0/boost_1_69_0.tar.gz && \
tar xvf boost_1_69_0.tar.gz && cd boost_1_69_0 && ./bootstrap.sh && \
tar xf boost_1_69_0.tar.gz && cd boost_1_69_0 && ./bootstrap.sh && \
sed -i -e 's|#if PTHREAD_STACK_MIN > 0|#ifdef PTHREAD_STACK_MIN|g' boost/thread/pthread/thread_data.hpp && \
# fix for compiler >=9.5 https://github.com/boostorg/thread/pull/297/files
./b2 -j ${JOBS} cxxstd=17 link=static cxxflags='-fPIC' cflags='-fPIC' \
--with-chrono --with-date_time --with-filesystem --with-program_options --with-system \
--with-random --with-thread --with-atomic --with-regex \
Expand All @@ -126,7 +124,7 @@ install

# Main at Fix building without MediaPipe (#2129)
# Update SHA in two places here and in WORKSPACE ovms git repository
ARG OVMS_COMMIT="7f372bc9b0a94cf546ef5f1a43e4a9bf768d6f85"
ARG OVMS_COMMIT="e2267e6b1b5715dc77aec6d89e299968287364fa"
RUN mkdir /opt/ovms
RUN wget -nv -P /opt/ovms https://raw.githubusercontent.com/openvinotoolkit/model_server/${OVMS_COMMIT}/third_party/cpprest/rest_sdk_v2.10.16.patch
RUN wget -nv -P /opt/ovms https://raw.githubusercontent.com/openvinotoolkit/model_server/${OVMS_COMMIT}/third_party/azure/azure_sdk.patch
Expand Down Expand Up @@ -180,7 +178,7 @@ RUN bazel build //mediapipe:geti_targets

# BUILD examples
ENV GLOG_logtostderr=1
ENV LD_LIBRARY_PATH="/opt/intel/openvino/runtime/lib/intel64/:${LD_LIBRARY_PATH}"
ENV LD_LIBRARY_PATH="/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64/:${LD_LIBRARY_PATH}"
RUN python setup_ovms.py --get_models && python setup_ovms.py --convert_pose --force
RUN bash build_desktop_examples.sh -b
RUN curl https://storage.googleapis.com/mediapipe-assets/ssdlite_object_detection_labelmap.txt -o mediapipe/models/ssdlite_object_detection_labelmap.txt
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ HTTPS_PROXY := "$(https_proxy)"
OVMS_MEDIA_DOCKER_IMAGE ?= mediapipe_ovms
OVMS_MEDIA_IMAGE_TAG ?= latest
INPUT_VIDEO_LINK ?= "https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920"
# Main at Fix building without MediaPipe (#2129)
OVMS_COMMIT ?="9bb7942622d30a3272128db03f5e8b158ee81dcc"
# ov 2024.2RC2 (#2484)
OVMS_COMMIT ?="f18aa027a13e2a1672f3fe131bbddfea5f70a986"
JOBS ?= $(shell python3 -c 'import multiprocessing as mp; print(mp.cpu_count())')
DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_ubuntu20_2024.1.0.15008.f4afc983258_x86_64.tgz
DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.2/linux/l_openvino_toolkit_ubuntu20_2024.2.0.15519.5c0f38f83f6_x86_64.tgz

# Targets to use outside running mediapipe_ovms container
docker_build:
Expand Down
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ http_archive(
http_archive(
name = "pybind11",
build_file = "@pybind11_bazel//:pybind11.BUILD",
strip_prefix = "pybind11-2.10.4",
urls = ["https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz"],
strip_prefix = "pybind11-2.11.1",
urls = ["https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz"],
)
load("@pybind11_bazel//:python_configure.bzl", "python_configure")
python_configure(name = "local_config_python")
Expand Down Expand Up @@ -644,7 +644,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "ovms",
remote = "https://github.com/openvinotoolkit/model_server",
commit = "9bb7942622d30a3272128db03f5e8b158ee81dcc", # ov 2024.1RC2 (#2418)
commit = "e2267e6b1b5715dc77aec6d89e299968287364fa", # ov 2024.2RC2 (#2484)
)

# DEV ovms - adjust local repository path for build
Expand Down Expand Up @@ -699,7 +699,7 @@ git_repository(
remote = "https://github.com/tensorflow/serving.git",
tag = "2.13.0",
patch_args = ["-p1"],
patches = ["@ovms//external:net_http.patch", "@ovms//external:listen.patch"]
patches = ["@ovms//external:net_http.patch", "@ovms//external:listen.patch", "@ovms//external:partial.patch"]
# ^^^^^^^^^^^^
# make bind address configurable
# ^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion mediapipe/modules/pose_detection/pose_detection_cpu.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ node {
}
#Input name: input_1:0; mapping_name: input_1:0; shape: (1,3,224,224); precision: FP32; layout: N...
#Output name: Identity:0; mapping_name: Identity; shape: (1,2254,12); precision: FP32; layout: N...
#Output name: Identity_1; mapping_name: Identity_1; shape: (1,2254,1); precision: FP32; layout: N...
#Output name: Identity_1:0; mapping_name: Identity_1; shape: (1,2254,1); precision: FP32; layout: N...

# Generates a single side packet containing a vector of SSD anchors based on
# the specification in the options.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ absl-py
attrs>=19.1.0
flatbuffers>=2.0
matplotlib
numpy
numpy<2.0.0
opencv-contrib-python
protobuf>=3.11,<4
sounddevice>=0.4.4
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ def run(self):
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand Down
2 changes: 1 addition & 1 deletion setup_opencv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ -z "$1" ]
echo "Installing OpenCV from source"
if [[ -x "$(command -v apt)" ]]; then
apt update && apt install -y build-essential git
apt install -y cmake ffmpeg libavformat-dev libdc1394-22-dev libgtk2.0-dev \
apt install -y cmake ffmpeg libavformat-dev libdc1394-dev libgtk2.0-dev \
libjpeg-dev libpng-dev libswscale-dev libtbb2 libtbb-dev \
libtiff-dev
elif [[ -x "$(command -v dnf)" ]]; then
Expand Down
1 change: 0 additions & 1 deletion third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ cmake(
"-lavformat",
"-lavutil",
"-lswscale",
"-lavresample",
"-ldl",
"-lm",
"-lpthread",
Expand Down

0 comments on commit a46cf12

Please sign in to comment.