Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,26 +1,18 @@
|
|
1 |
import os
|
2 |
import os
|
3 |
|
4 |
-
os.system("wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb")
|
5 |
-
os.system("sudo dpkg-i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb")
|
6 |
-
os.system("sudo apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub")
|
7 |
-
os.system("sudo apt-get update")
|
8 |
-
os.system("sudo apt-get install cuda")
|
9 |
|
10 |
-
os.system("nvcc --version")
|
11 |
-
print(os.environ.get('CUDA_PATH'))
|
12 |
os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
|
13 |
-
os.system("git clone https://github.com/
|
14 |
|
15 |
os.chdir("Mask2Former")
|
16 |
-
os.system("pwd")
|
17 |
os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
|
18 |
-
|
19 |
-
#
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
os.chdir("/home/user/app/Mask2Former/")
|
25 |
os.system("pwd")
|
26 |
import gradio as gr
|
|
|
1 |
import os
|
2 |
import os
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
5 |
os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
|
6 |
+
os.system("git clone https://github.com/AK391/Mask2Former.git")
|
7 |
|
8 |
os.chdir("Mask2Former")
|
|
|
9 |
os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
|
10 |
+
os.chdir("mask2former/modeling/pixel_decoder/ops")
|
11 |
+
#s.system("pwd")
|
12 |
|
13 |
+
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0"
|
14 |
+
os.environ["FORCE_CUDA"] = "1"
|
15 |
+
os.system("python setup.py build install")
|
16 |
os.chdir("/home/user/app/Mask2Former/")
|
17 |
os.system("pwd")
|
18 |
import gradio as gr
|