diff --git a/src/docs/BUILD.md b/src/docs/BUILD.md index 5627b562cd..df9a391d97 100644 --- a/src/docs/BUILD.md +++ b/src/docs/BUILD.md @@ -34,8 +34,10 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ## Build Instructions +### Build OpenVINO and OpenVINO GenAI from sources + 1. Build and install OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/wiki#how-to-build). -The path to the OpenVINO install directory is referred as `` throughout the document. +The path to the OpenVINO install directory is referred as `` throughout the document. 2. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git @@ -43,9 +45,30 @@ The path to the OpenVINO install directory is referred as `` throu ``` 3. Build the project: ```sh - source /setupvars.sh + source /setupvars.sh + cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ + cmake --build ./build/ --config Release --target package -j + cmake --install ./build/ --config Release --prefix + ``` + > **NOTE**: For running setupvars script on Windows, use command `call \setupvars.bat` + +### Build OpenVINO GenAI only + +Assuming that you have OpenVINO installed at ``: + +1. Clone OpenVINO GenAI repository and init submodules: + ```sh + git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git + cd openvino.genai + ``` +2. Build the project: + ```sh + export OpenVINO_DIR=/runtime cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j - cmake --install ./build/ --config Release --prefix ``` - > **NOTE**: For running setupvars script on Windows, use command `call \setupvars.bat` +3. Set environment variables: + ```sh + export PYTHONPATH=/python:./build/:${PYTHONPATH} + export LD_LIBRARY_PATH=/runtime/lib/intel64:${LD_LIBRARY_PATH} + ```