retry to fix installation
Browse files
app.py
CHANGED
@@ -1,29 +1,14 @@
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
3 |
|
4 |
-
from setuptools import setup, find_packages
|
5 |
-
from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CppExtension
|
6 |
-
|
7 |
-
setup(
|
8 |
-
name='featup',
|
9 |
-
version='0.1.2',
|
10 |
-
packages=find_packages(),
|
11 |
-
ext_modules=[
|
12 |
-
CUDAExtension(
|
13 |
-
'adaptive_conv_cuda_impl',
|
14 |
-
[
|
15 |
-
'featup/adaptive_conv_cuda/adaptive_conv_cuda.cpp',
|
16 |
-
'featup/adaptive_conv_cuda/adaptive_conv_kernel.cu',
|
17 |
-
]),
|
18 |
-
CppExtension(
|
19 |
-
'adaptive_conv_cpp_impl',
|
20 |
-
['featup/adaptive_conv_cuda/adaptive_conv.cpp'],
|
21 |
-
undef_macros=["NDEBUG"]),
|
22 |
-
],
|
23 |
-
cmdclass={
|
24 |
-
'build_ext': BuildExtension
|
25 |
-
}
|
26 |
-
)
|
27 |
|
28 |
import matplotlib.pyplot as plt
|
29 |
import torch
|
|
|
1 |
+
import os
|
2 |
+
import subprocess
|
3 |
|
4 |
+
# Set the CUDA_HOME environment variable
|
5 |
+
os.environ['CUDA_HOME'] = '/usr/local/cuda'
|
6 |
+
os.environ['PATH'] = os.environ['CUDA_HOME'] + '/bin:' + os.environ['PATH']
|
7 |
+
os.environ['LD_LIBRARY_PATH'] = os.environ['CUDA_HOME'] + '/lib64:' + os.environ.get('LD_LIBRARY_PATH', '')
|
8 |
|
9 |
+
# Install the required package from GitHub
|
10 |
+
subprocess.check_call(["pip", "install", "git+https://github.com/mhamilton723/FeatUp"])
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
import matplotlib.pyplot as plt
|
14 |
import torch
|