Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable a pip build #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added TartanAir.pickle
Binary file not shown.
1 change: 1 addition & 0 deletions dpvo/dpvo.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def terminate(self):
poses = lietorch.stack(poses, dim=0)
poses = poses.inv().data.cpu().numpy()
tstamps = np.array(self.tlist, dtype=np.float64)

if self.viewer is not None:
self.viewer.join()

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel", "torch>=2.5.0"]
build-backend = "setuptools.build_meta"
28 changes: 28 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plyfile
argcomplete==2.0.0
beautifulsoup4==4.11.1
cmake==3.22.4
colorama==0.4.5
evo==1.18.1
filelock==3.7.1
gdown==4.5.1
lz4==4.0.1
natsort==8.1.0
opencv-python==4.6.0.66
pandas==1.4.3
pygments==2.12.0
pytz==2022.1
pyyaml==6.0
rosbags==0.9.11
ruamel-yaml==0.17.21
ruamel-yaml-clib==0.2.6
seaborn==0.11.2
soupsieve==2.3.2.post1
yacs==0.1.8
zstandard==0.18.0
torch==2.2.0 #1.12.0
torchvision #==0.13.0
torchaudio #==0.12.0
-f https://data.pyg.org/whl/torch-2.2.0+cu121.html
torch-scatter
matplotlib==3.5.1
51 changes: 27 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
import os.path as osp
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension

ROOT = osp.dirname(osp.abspath(__file__))



setup(
name='dpvo',
packages=find_packages(),
ext_modules=[
def get_extensions():
from torch.utils.cpp_extension import CUDAExtension
return [
CUDAExtension('cuda_corr',
sources=['dpvo/altcorr/correlation.cpp', 'dpvo/altcorr/correlation_kernel.cu'],
extra_compile_args={
'cxx': ['-O3'],
'cxx': ['-O3'],
'nvcc': ['-O3'],
}),
CUDAExtension('cuda_ba',
sources=['dpvo/fastba/ba.cpp', 'dpvo/fastba/ba_cuda.cu', 'dpvo/fastba/block_e.cu'],
extra_compile_args={
'cxx': ['-O3'],
'cxx': ['-O3'],
'nvcc': ['-O3'],
},
include_dirs=[
osp.join(ROOT, 'thirdparty/eigen-3.4.0')]
),
CUDAExtension('lietorch_backends',
include_dirs=[
osp.join(ROOT, 'dpvo/lietorch/include'),
osp.join(ROOT, 'thirdparty/eigen-3.4.0')],
sources=[
'dpvo/lietorch/src/lietorch.cpp',
'dpvo/lietorch/src/lietorch_gpu.cu',
'dpvo/lietorch/src/lietorch_cpu.cpp'],
extra_compile_args={'cxx': ['-O3'], 'nvcc': ['-O3'],}),
}),
]
# return []

def get_build_extension():
# return None
from torch.utils.cpp_extension import BuildExtension
return BuildExtension

setup(
name='dpvo',
version='0.1',
packages=find_packages(),
install_requires=[
'torch',
'torchvision',
'torchaudio',
],
ext_modules=get_extensions(),
cmdclass={
'build_ext': BuildExtension
})
'build_ext': get_build_extension()
},
)


129 changes: 129 additions & 0 deletions system-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
absl-py=1.1.0
aiohttp=3.8.1
aiosignal=1.2.0
async-timeout=4.0.2
attrs=21.4.0
blas=1.0
blinker=1.4
brotli=1.0.9
brotlipy=0.7.0
bzip2=1.0.8
c-ares=1.18.1
ca-certificates=2022.6.15
cachetools=5.0.0
certifi=2022.6.15
cffi=1.15.0
charset-normalizer=2.0.4
click=8.1.3
cryptography=37.0.1
cudatoolkit=11.3.1
cycler=0.11.0
dbus=1.13.18
expat=2.4.4
ffmpeg=4.3
fontconfig=2.13.1
fonttools=4.25.0
freetype=2.11.0
frozenlist=1.3.0
giflib=5.2.1
glib=2.69.1
gmp=6.2.1
gnutls=3.6.15
google-auth=2.9.1
google-auth-oauthlib=0.4.6
grpcio=1.42.0
gst-plugins-base=1.14.0
gstreamer=1.14.0
icu=58.2
idna=3.3
importlib-metadata=4.11.4
intel-openmp=2021.4.0
jpeg=9e
kiwisolver=1.4.2
lame=3.100
lcms2=2.12
ld_impl_linux-64=2.38
libffi=3.3
libgcc-ng=11.2.0
libgfortran-ng=7.5.0
libgfortran4=7.5.0
libgomp=11.2.0
libiconv=1.16
libidn2=2.3.2
libpng=1.6.37
libprotobuf=3.19.1
libstdcxx-ng=11.2.0
libtasn1=4.16.0
libtiff=4.2.0
libunistring=0.9.10
libuuid=1.0.3
libwebp=1.2.2
libwebp-base=1.2.2
libxcb=1.15
libxml2=2.9.14
lz4-c=1.9.3
markdown=3.4.1
matplotlib=3.5.1
matplotlib-base=3.5.1
mkl=2021.4.0
mkl-service=2.4.0
mkl_fft=1.3.1
mkl_random=1.2.2
multidict=6.0.2
munkres=1.1.4
ncurses=6.3
nettle=3.7.3
numpy=1.22.3
numpy-base=1.22.3
oauthlib=3.2.0
openh264=2.1.1
openssl=1.1.1q
packaging=21.3
pcre=8.45
pillow=9.2.0
pip=22.1.2
protobuf=3.19.1
pyasn1=0.4.8
pyasn1-modules=0.2.7
pycparser=2.21
pyjwt=2.4.0
pyopenssl=22.0.0
pyparsing=3.0.4
pyqt=5.9.2
pysocks=1.7.1
python=3.10.0
python-dateutil=2.8.2
python_abi=3.10
pytorch=1.12.0
pytorch-mutex=1.0
pytorch-scatter=2.0.9
pyu2f=0.1.5
qt=5.9.7
readline=8.1.2
requests=2.28.1
requests-oauthlib=1.3.1
rsa=4.9
scipy=1.7.3
setuptools=61.2.0
sip=4.19.13
six=1.16.0
sqlite=3.38.5
tensorboard=2.9.1
tensorboard-data-server=0.6.0
tensorboard-plugin-wit=1.8.1
tk=8.6.12
torchaudio=0.12.0
torchvision=0.13.0
tornado=6.1
tqdm=4.64.0
typing-extensions=4.1.1
typing_extensions=4.1.1
tzdata=2022a
urllib3=1.26.9
werkzeug=2.1.2
wheel=0.37.1
xz=5.2.5
yarl=1.7.2
zipp=3.8.0
zlib=1.2.12
zstd=1.5.2