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

Produce a single archive #718

Closed
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
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ project(OpenVINOGenAI
HOMEPAGE_URL "https://github.com/openvinotoolkit/openvino.genai"
LANGUAGES CXX)

option(GENAI_CPACK_ARCHIVE_COMPONENT_INSTALL "If enabled (ON) multiple packages are generated." ON)
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" OFF)
option(RAPIDJSON_BUILD_DOC "Build rapidjson documentation." OFF)

Expand Down Expand Up @@ -64,7 +65,7 @@ add_subdirectory(tests/cpp)

install(FILES LICENSE DESTINATION docs/licensing COMPONENT licensing_genai RENAME LICENSE-GENAI)
install(FILES third-party-programs.txt DESTINATION docs/licensing COMPONENT licensing_genai RENAME third-party-programs-genai.txt)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ${GENAI_CPACK_ARCHIVE_COMPONENT_INSTALL})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can just use:

if(NOT DEFINED CPACK_ARCHIVE_COMPONENT_INSTALL )
    set(CPACK_ARCHIVE_COMPONENT_INSTALL  ON)
endif()

instead of extra option with different name

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that as well. It doesn't work

Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See openvinotoolkit/openvino#25867

We need the same fix for GenAI - tested locally against OV PR.

set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/2614
set(CPACK_COMPONENTS_ALL core_genai core_genai_dev cpp_samples_genai licensing_genai openvino_tokenizers openvino_tokenizers_docs)
Expand Down
12 changes: 10 additions & 2 deletions src/docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The path to the OpenVINO install directory is referred as `<INSTALL_DIR>` throug

4. Build the project:
```sh
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake -DCMAKE_BUILD_TYPE=Release -DGENAI_CPACK_ARCHIVE_COMPONENT_INSTALL=OFF -S ./ -B ./build/
cmake --build ./build/ --config Release -j
```

Expand All @@ -113,7 +113,15 @@ The path to the OpenVINO install directory is referred as `<INSTALL_DIR>` throug
cmake --install ./build/ --config Release --prefix <INSTALL_DIR>
```

#### Option 2 - setting paths to built OpenVINO GenAI artifacts manually:
#### Option 2 - generate an archive

The following command will generate an archive containing OpenVINO Tokenizers and OpenVINO GenAI. The archive won't include OpenVINO itself, run the command for OpenVINO to generate an OpenVINO only archive. Generation of an archive containig all the components isn't implemented.

```sh
cmake --build ./build/ --config Release --target package
```

#### Option 3 - setting paths to built OpenVINO GenAI artifacts manually:

The path to the OpenVINO GenAI root directory is referred as `<GENAI_ROOT_DIR>` throughout the document.

Expand Down
Loading