Spaces:
Build error
Build error
dependency fixed
Browse files- app.py +14 -4
- requirements.txt +5 -1
app.py
CHANGED
@@ -1,14 +1,24 @@
|
|
1 |
import os
|
2 |
import wget
|
3 |
import subprocess
|
|
|
|
|
4 |
|
5 |
if os.getenv('SYSTEM') == 'spaces':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
subprocess.run(
|
7 |
-
'pip install
|
8 |
-
|
9 |
-
'pip install https://download.is.tue.mpg.de/icon/HF/pytorch3d-0.7.0-cp38-cp38-linux_x86_64.whl'.split())
|
10 |
|
11 |
-
import torch
|
12 |
import argparse
|
13 |
import gradio as gr
|
14 |
from functools import partial
|
|
|
1 |
import os
|
2 |
import wget
|
3 |
import subprocess
|
4 |
+
import sys
|
5 |
+
import torch
|
6 |
|
7 |
if os.getenv('SYSTEM') == 'spaces':
|
8 |
+
pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
|
9 |
+
version_str="".join([
|
10 |
+
f"py3{sys.version_info.minor}_cu",
|
11 |
+
torch.version.cuda.replace(".",""),
|
12 |
+
f"_pyt{pyt_version_str}"
|
13 |
+
])
|
14 |
+
# subprocess.run(
|
15 |
+
# 'pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html'.split())
|
16 |
+
# subprocess.run(
|
17 |
+
# 'pip install https://download.is.tue.mpg.de/icon/HF/pytorch3d-0.7.0-cp38-cp38-linux_x86_64.whl'.split())
|
18 |
subprocess.run(
|
19 |
+
f'pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html'.split())
|
20 |
+
|
|
|
21 |
|
|
|
22 |
import argparse
|
23 |
import gradio as gr
|
24 |
from functools import partial
|
requirements.txt
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
gradio
|
2 |
albumentations==1.3.0
|
3 |
opencv-contrib-python==4.3.0.36
|
@@ -31,4 +33,6 @@ git+https://github.com/openai/point-e
|
|
31 |
git+https://github.com/huggingface/diffusers
|
32 |
git+https://github.com/cloneofsimo/lora.git
|
33 |
git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba
|
34 |
-
accelerate
|
|
|
|
|
|
1 |
+
torch==1.13.1
|
2 |
+
torchvision==0.14.1
|
3 |
gradio
|
4 |
albumentations==1.3.0
|
5 |
opencv-contrib-python==4.3.0.36
|
|
|
33 |
git+https://github.com/huggingface/diffusers
|
34 |
git+https://github.com/cloneofsimo/lora.git
|
35 |
git+https://github.com/Ir1d/image-background-remove-tool@2b68f5276d0f2e90f607c7845c60d2bddb79d5ba
|
36 |
+
accelerate
|
37 |
+
fvcore
|
38 |
+
iopath
|