Skip to content

Commit

Permalink
installation
Browse files Browse the repository at this point in the history
  • Loading branch information
yysijie committed Jan 20, 2020
1 parent 2d9f439 commit fa5f529
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 184 deletions.
7 changes: 6 additions & 1 deletion doc/GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## Getting Started

[Option] **Create** a conda virtual environment and activate it:
**Create** a [conda](www.anaconda.com/distribution/) virtual environment and activate it:

``` shell
conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
```

Install **PyTorch** and torchvision following the [official instructions](https://pytorch.org/), e.g.,
``` shell
conda install pytorch torchvision -c pytorch
```

**Clone** mmskeleton from github:

``` shell
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pillow<7
pillow
torch
torchvision
mmcv
lazy_import
158 changes: 0 additions & 158 deletions setup-lite.py

This file was deleted.

41 changes: 18 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import time

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

import numpy as np
from Cython.Build import cythonize # noqa: E402
Expand Down Expand Up @@ -141,7 +141,7 @@ def make_cython_ext(name, module, sources):
setup_requires=['pytest-runner'],
tests_require=['pytest'],
dependency_links=[
'git+https://github.com/open-mmlab/mmdetection#egg=mmdet'
'git+https://github.com/open-mmlab/mmdetection/tarball/master/#egg=mmdet'
],
install_requires=get_requirements() + ['mmdet'],
ext_modules=[
Expand All @@ -151,27 +151,22 @@ def make_cython_ext(name, module, sources):
'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']]),
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']],
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},
zip_safe=False)

0 comments on commit fa5f529

Please sign in to comment.