forked from openvinotoolkit/openvino.genai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Wovchena/package
Package
- Loading branch information
Showing
9 changed files
with
557 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: genai_lib | ||
on: pull_request | ||
jobs: | ||
genai_lib_ubuntu: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: mkdir ./ov/ | ||
- 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 | ||
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh | ||
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ | ||
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j | ||
- run: python -m pip install openvino # Can't load CenOS libraries from the archive | ||
- run: PYTHONPATH=./src/python/ python -c "from openvino_genai.py_generate_pipeline import LLMPipeline" | ||
- run: source ./ov/setupvars.sh && python -m pip install --pre --upgrade . --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly | ||
- run: python -c "from openvino_genai.py_generate_pipeline import LLMPipeline" | ||
|
||
genai_lib_windows: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: cmd | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.1.0-14645-e6dc0865128/w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64.zip | ||
- run: unzip ov.zip | ||
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ | ||
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && cmake --build ./build/ --config Release -j | ||
- run: python -m pip install "numpy<1.27" | ||
- run: set "PYTHONPATH=./src/python;" && call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && python -c "from openvino_genai.py_generate_pipeline import LLMPipeline" # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that. | ||
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && python -m pip install . | ||
- run: python -c "from openvino_genai.py_generate_pipeline import LLMPipeline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[project] | ||
name = "openvino_genai" | ||
version = "2024.2.0.0" | ||
description = "Python bindings for https://github.com/openvinotoolkit/openvino.genai" | ||
requires-python = ">=3.8" | ||
readme = {file = "text_generation/causal_lm/cpp/README.md", content-type="text/markdown"} | ||
license = {text = "OSI Approved :: Apache Software License"} | ||
authors = [ | ||
{ name = "OpenVINO Developers", email = "[email protected]" }, | ||
] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
dependencies = [ | ||
"openvino_tokenizers~=2024.1.0.0" | ||
] | ||
|
||
[tool.scikit-build] | ||
cmake.source-dir = "./" | ||
cmake.build-type = "Release" | ||
cmake.targets = ["py_generate_pipeline", "generate_pipeline_lib"] | ||
install.components = ["genai", "genai_python"] | ||
sdist.cmake = true | ||
wheel.packages = ["src/python/openvino_genai"] | ||
wheel.install-dir = "openvino_genai" | ||
wheel.build-tag = "000" | ||
wheel.license-files = ["LICENSE", "SECURITY.md", "third-party-programs.txt"] | ||
|
||
[[tool.scikit-build.generate]] | ||
path = "openvino_genai/__version__.py" | ||
template = ''' | ||
__version__ = "${version}" | ||
''' | ||
|
||
[build-system] | ||
requires = ["scikit-build-core~=0.8.0"] # See https://github.com/openvinotoolkit/openvino_tokenizers/pull/123 | ||
build-backend = "scikit_build_core.build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import openvino # add_dll_directory for openvino lib | ||
import os | ||
from .__version__ import __version__ | ||
|
||
|
||
if hasattr(os, "add_dll_directory"): | ||
os.add_dll_directory(os.path.dirname(__file__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# this property will be overwritten by value from pyproject.toml | ||
__version__ = "0.0.0.0" |
Oops, something went wrong.