Skip to content

Commit

Permalink
feat: Output .so to local
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGinn <brian.mcginn@intel.com>
  • Loading branch information
brian-intel committed Jun 3, 2024
1 parent a60aa67 commit 8059e1d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ docs/sitemap.xml.gz
docs/*
profile-launcher/profile-launcher
smoke_tests_output.log
profile-launcher/*.out
profile-launcher/*.out
model_server
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ build-profile-launcher:
@mkdir -p ./results || true
@cd ./profile-launcher && $(MAKE) build

build-capi-python:
ovms-build-image:
git clone https://github.com/openvinotoolkit/model_server
cd model_server && CHECK_COVERAGE=0 RUN_TESTS=0 make ovms_builder_image

build-capi-python:
docker build -f capi_python/Dockerfile -t capi_python_bind:dev .

run:
Expand Down
7 changes: 6 additions & 1 deletion capi_python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ WORKDIR /model_server

COPY capi_python/ /model_server/src/capi_python

RUN bazel --output_base=$PWD/output build //src/capi_python:ovmspybind.so
RUN bazel --jobs=8 build //src/capi_python:ovmspybind.so

RUN find / -name "ovmspybind.so" -exec cp "{}" /output/ovmspybind.so \;

# FROM scratch as bin
# COPY --from=builder /output/ovmspybind.so /
8 changes: 6 additions & 2 deletions capi_python/commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ docker run -it -v ${PWD}:/ovms --rm --entrypoint bash -p 9178:9178 openvino/mode
bazel build //src:ovms
find / -type f -name "pyovms.so"
find / -type f -name "ovmspybind.so"

find / -name "mytest.txt" -exec cp "{}" /output/mytest.txt \;

rm /ovms/src/python/capi_python/ovmspybind.so && cp /root/.cache/bazel/_bazel_root/bc57d4817a53cab8c785464da57d1983/execroot/ovms/bazel-out/k8-opt/bin/src/python/capi_python/ovmspybind.so src/python/capi_python/

python3 src/python/capi_python/ovms-pybind.py

bazel --output_base=$PWD/output build //src/python/capi_python:ovmspybind.so
bazel --output_base=$PWD/output build //src/python/capi_python:ovmspybind.so

/model_serve

/root/.cache/bazel/_bazel_root/a249bbdc9c7f020e8d44a19d57754c73/execroot/ovms/bazel-out/k8-opt/bin/src/capi_python/ovmspybind.so

0 comments on commit 8059e1d

Please sign in to comment.