Skip to content

Commit

Permalink
setup lite version
Browse files Browse the repository at this point in the history
  • Loading branch information
yysijie committed Jan 20, 2020
1 parent 9c4e8b5 commit 0e2ec43
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 28 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pillow<7
pillow<7
torch
torchvision
mmcv
Expand Down
90 changes: 63 additions & 27 deletions setup-lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
import subprocess
import time

from setuptools import find_packages, setup, dist
dist.Distribution().fetch_build_eggs(['Cython', 'numpy>=1.11.1'])
from setuptools import find_packages, setup, dist, Extension
dist.Distribution().fetch_build_eggs(['numpy>=1.11.1'])
import numpy as np

sys.path.append('./src')
from nms.setup_linux import custom_build_ext, CUDA


def readme():
Expand Down Expand Up @@ -95,28 +99,60 @@ def get_requirements(filename='requirements.txt'):

if __name__ == '__main__':
write_version_py()
setup(name='mmskeleton',
version=get_version(),
scripts=['./tools/mmskl'],
description='Open MMLab Skeleton-based Human Understanding Toolbox',
long_description=readme(),
keywords='computer vision, human understanding, action recognition',
url='https://github.com/open-mmlab/mmskeleton',
packages=find_packages(exclude=('configs', 'tools', 'demo')),
package_data={'mmskeleton.ops': ['*/*.so']},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
license='Apache License 2.0',
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=get_requirements(),
zip_safe=False)
setup(
name='mmskeleton',
version=get_version(),
scripts=['./tools/mmskl'],
description='Open MMLab Skeleton-based Human Understanding Toolbox',
long_description=readme(),
keywords='computer vision, human understanding, action recognition',
url='https://github.com/open-mmlab/mmskeleton',
packages=find_packages(exclude=('configs', 'tools', 'demo')),
package_data={'mmskeleton.ops': ['*/*.so']},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
license='Apache License 2.0',
setup_requires=['pytest-runner'],
tests_require=['pytest'],
install_requires=get_requirements(),
zip_safe=False,
ext_modules=[
Extension("mmskeleton.ops.nms.cpu_nms",
["mmskeleton/ops/nms/cpu_nms.pyx"],
extra_compile_args={
'gcc': ["-Wno-cpp", "-Wno-unused-function"]
},
include_dirs=[np.get_include()]),
Extension(
'mmskeleton.ops.nms.gpu_nms',
[
'mmskeleton/ops/nms/nms_kernel.cu',
'mmskeleton/ops/nms/gpu_nms.pyx'
],
library_dirs=[CUDA['lib64']],
libraries=['cudart'],
language='c++',
runtime_library_dirs=[CUDA['lib64']],
# this syntax is specific to this build system
# we're only going to use certain compiler args with nvcc and not with
# gcc the implementation of this trick is in customize_compiler() below
extra_compile_args={
'gcc': ["-Wno-unused-function"],
'nvcc': [
'-arch=sm_35', '--ptxas-options=-v', '-c',
'--compiler-options', "'-fPIC'"
]
},
include_dirs=[np.get_include(), CUDA['include']]),
],
cmdclass={'build_ext': custom_build_ext},
)

0 comments on commit 0e2ec43

Please sign in to comment.