Skip to content

Commit 18f8ca8

Browse files
committed
ubuntu22
1 parent 3507deb commit 18f8ca8

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.github/workflows/genai_python_lib.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: genai_python_lib
22
on: pull_request
33
jobs:
44
ubuntu_genai_python_lib:
5-
runs-on: ubuntu-20.04
5+
runs-on: ubuntu-22.04
66
steps:
77
- uses: actions/checkout@v4
88
with:
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
python-version: 3.8
1313
- run: mkdir ./ov/
14-
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.1.0-14758-22bd6ff0494/l_openvino_toolkit_centos7_2024.1.0.dev20240315_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz # Install CentOS7 instead of Ubuntu to match PyPI distribution ABI
14+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.2.0-15484-4b8641ee3f4/l_openvino_toolkit_centos7_2024.2.0.dev20240523_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz # Install CentOS7 instead of Ubuntu to match PyPI distribution ABI
1515
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
1616
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
1717
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j

src/cpp/CMakeLists.txt

+13-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,19 @@ install(TARGETS ${TARGET_NAME}
7575
RUNTIME DESTINATION python/openvino_genai/ COMPONENT pygenai_${Python_VERSION_MAJOR}_${Python_VERSION_MINOR})
7676

7777
# Copy libcore_tokenizers.so to build_dir/openvino_tokenizers/src/
78-
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
79-
COMMAND "${CMAKE_COMMAND}" -E copy
80-
"$<TARGET_FILE:core_tokenizers>"
81-
"${CMAKE_BINARY_DIR}/openvino_tokenizers/src/"
82-
COMMENT "Copy libcore_tokenizers.so to build_dir/openvino_tokenizers/src/")
78+
if(TARGET core_tokenizers)
79+
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
80+
COMMAND "${CMAKE_COMMAND}" -E copy
81+
"$<TARGET_FILE:core_tokenizers>"
82+
"${CMAKE_BINARY_DIR}/openvino_tokenizers/src/"
83+
COMMENT "Copy libcore_tokenizers.so to build_dir/openvino_tokenizers/src/")
84+
elseif(NOT MSVC)
85+
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
86+
COMMAND "${CMAKE_COMMAND}" -E copy
87+
"${CMAKE_BINARY_DIR}/_deps/fast_tokenizer-src/lib/libcore_tokenizers.so"
88+
"${CMAKE_BINARY_DIR}/openvino_tokenizers/src/"
89+
COMMENT "Copy libcore_tokenizers.so to build_dir/openvino_tokenizers/src/")
90+
endif()
8391

8492
# - Windows: `<openvino_dir>\runtime\bin\intel64\Release\`
8593
# - MacOS_x86: `<openvino_dir>/runtime/lib/intel64/Release`

0 commit comments

Comments
 (0)