Unverified Commit e7bc11b4 authored by Chen Xin's avatar Chen Xin Committed by GitHub
Browse files

Add triton_models to whl package (#163)

* defer symlink

* fix lint
parent 5ed6bb59
...@@ -3,3 +3,5 @@ include lmdeploy/lib/*.so ...@@ -3,3 +3,5 @@ include lmdeploy/lib/*.so
include lmdeploy/lib/*.so* include lmdeploy/lib/*.so*
include lmdeploy/lib/*.dll include lmdeploy/lib/*.dll
include lmdeploy/lib/*.pyd include lmdeploy/lib/*.pyd
include lmdeploy/serve/turbomind/service_docker_up.sh
recursive-include lmdeploy/serve/turbomind/triton_models *
...@@ -497,6 +497,15 @@ def pack_model_repository(workspace_path: str): ...@@ -497,6 +497,15 @@ def pack_model_repository(workspace_path: str):
Args: Args:
workspace_path: the path of workspace workspace_path: the path of workspace
""" """
os.symlink(src='../../tokenizer',
dst=osp.join(workspace_path, 'triton_models', 'preprocessing',
'1', 'tokenizer'))
os.symlink(src='../../tokenizer',
dst=osp.join(workspace_path, 'triton_models', 'postprocessing',
'1', 'tokenizer'))
os.symlink(src='../../weights',
dst=osp.join(workspace_path, 'triton_models', 'interactive',
'1', 'weights'))
model_repo_dir = osp.join(workspace_path, 'model_repository') model_repo_dir = osp.join(workspace_path, 'model_repository')
os.makedirs(model_repo_dir, exist_ok=True) os.makedirs(model_repo_dir, exist_ok=True)
os.symlink(src=osp.join('../triton_models/interactive'), os.symlink(src=osp.join('../triton_models/interactive'),
......
...@@ -103,8 +103,7 @@ if __name__ == '__main__': ...@@ -103,8 +103,7 @@ if __name__ == '__main__':
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
author='OpenMMLab', author='OpenMMLab',
author_email='openmmlab@gmail.com', author_email='openmmlab@gmail.com',
packages=find_packages( packages=find_packages(exclude=()),
exclude=('lmdeploy/serve/turbomind/triton_models', )),
include_package_data=True, include_package_data=True,
install_requires=parse_requirements('requirements.txt'), install_requires=parse_requirements('requirements.txt'),
classifiers=[ classifiers=[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment