mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* move to lib * optional import pytorch rewriter * reduce torch dependancy of tensorrt export * remove more mmcv support * fix pytest * remove mmcv logge * Add `mmdeploy.utils.logging` * Improve the common of the `get_logger` * Fix lint * onnxruntim add try catch to import wrapper if pytorch is available * Using `mmcv.utils.logging` in all files under `mmdeploy/codebase` * add __init__ * add prebuild tools * support windows * for comment * exit if failed * add exist * decouple * add tags * remove .mmdeploy_python * read python version from system * update windows config * update linux config * remote many * better build name * rename python tag * fix pyhon-tag * update window config * add env search * update tag * fix build without CUDA_TOOLKIT_ROOT_DIR Co-authored-by: HinGwenWoong <peterhuang0323@outlook.com>
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
import os
|
|
import os.path as osp
|
|
import platform
|
|
|
|
try:
|
|
from setuptools import find_packages, setup
|
|
except ImportError:
|
|
from distutils.core import find_packages, setup
|
|
|
|
CURDIR = os.path.realpath(os.path.dirname(__file__))
|
|
version_file = osp.join(CURDIR, 'mmdeploy_python', 'version.py')
|
|
|
|
|
|
def get_version():
|
|
with open(version_file, 'r') as f:
|
|
exec(compile(f.read(), version_file, 'exec'))
|
|
return locals()['__version__']
|
|
|
|
|
|
def get_platform_name():
|
|
return platform.machine()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
setup(
|
|
name='mmdeploy_python',
|
|
version=get_version(),
|
|
description='OpenMMLab Model Deployment SDK python api',
|
|
author='OpenMMLab',
|
|
author_email='openmmlab@gmail.com',
|
|
keywords='computer vision, model deployment',
|
|
url='https://github.com/open-mmlab/mmdeploy',
|
|
packages=find_packages(),
|
|
include_package_data=True,
|
|
platforms=get_platform_name(),
|
|
package_data={'mmdeploy_python': ['*.so*', '*.pyd', '*.pdb']},
|
|
license='Apache License 2.0')
|