Spaces:
Running
on
Zero
Running
on
Zero
root
commited on
Commit
•
cd6ccd5
1
Parent(s):
1a00043
udpate
Browse files- Dockerfile +29 -0
- README.md +1 -4
- app.py +0 -2
- environment.yaml +165 -0
- run.sh +6 -18
Dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM continuumio/anaconda3:main
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
COPY ./environment.yml /code/environment.yml
|
5 |
+
|
6 |
+
# Create the environment using the environment.yml file
|
7 |
+
RUN conda env create -f /code/environment.yml
|
8 |
+
|
9 |
+
# Set up a new user named "user" with user ID 1000
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
+
# Switch to the "user" user
|
12 |
+
USER user
|
13 |
+
# Set home to the user's home directory
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PYTHONPATH=$HOME/app \
|
16 |
+
PYTHONUNBUFFERED=1 \
|
17 |
+
GRADIO_ALLOW_FLAGGING=never \
|
18 |
+
GRADIO_NUM_PORTS=1 \
|
19 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
20 |
+
GRADIO_THEME=huggingface \
|
21 |
+
SYSTEM=spaces
|
22 |
+
|
23 |
+
# Set the working directory to the user's home directory
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
27 |
+
COPY --chown=user . $HOME/app
|
28 |
+
|
29 |
+
CMD ["./run.sh"]
|
README.md
CHANGED
@@ -3,10 +3,7 @@ title: ViewCrafter
|
|
3 |
emoji: 🐨
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
-
|
7 |
-
sdk: gradio
|
8 |
-
sdk_version: 4.36.0
|
9 |
-
app_file: app.py
|
10 |
pinned: false
|
11 |
license: other
|
12 |
---
|
|
|
3 |
emoji: 🐨
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
+
sdk: docker
|
|
|
|
|
|
|
7 |
pinned: false
|
8 |
license: other
|
9 |
---
|
app.py
CHANGED
@@ -2,8 +2,6 @@ import os
|
|
2 |
import torch
|
3 |
import sys
|
4 |
|
5 |
-
# os.system('pip install iopath')
|
6 |
-
os.system("pip install -v -v -v 'git+https://github.com/facebookresearch/pytorch3d.git@stable'")
|
7 |
os.system("wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/")
|
8 |
|
9 |
import gradio as gr
|
|
|
2 |
import torch
|
3 |
import sys
|
4 |
|
|
|
|
|
5 |
os.system("wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/")
|
6 |
|
7 |
import gradio as gr
|
environment.yaml
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: viewcrafter
|
2 |
+
channels:
|
3 |
+
- https://anaconda.org/pytorch3d/pytorch3d/0.7.5/download
|
4 |
+
- defaults
|
5 |
+
dependencies:
|
6 |
+
- _libgcc_mutex=0.1=main
|
7 |
+
- _openmp_mutex=5.1=1_gnu
|
8 |
+
- ca-certificates=2024.7.2=h06a4308_0
|
9 |
+
- ld_impl_linux-64=2.38=h1181459_1
|
10 |
+
- libffi=3.4.4=h6a678d5_1
|
11 |
+
- libgcc-ng=11.2.0=h1234567_1
|
12 |
+
- libgomp=11.2.0=h1234567_1
|
13 |
+
- libstdcxx-ng=11.2.0=h1234567_1
|
14 |
+
- ncurses=6.4=h6a678d5_0
|
15 |
+
- openssl=3.0.14=h5eee18b_0
|
16 |
+
- python=3.9.16=h955ad1f_3
|
17 |
+
- pytorch3d=0.7.5=py39_cu117_pyt1131
|
18 |
+
- readline=8.2=h5eee18b_0
|
19 |
+
- setuptools=72.1.0=py39h06a4308_0
|
20 |
+
- sqlite=3.45.3=h5eee18b_0
|
21 |
+
- tk=8.6.14=h39e8969_0
|
22 |
+
- wheel=0.43.0=py39h06a4308_0
|
23 |
+
- xz=5.4.6=h5eee18b_1
|
24 |
+
- zlib=1.2.13=h5eee18b_1
|
25 |
+
- pip:
|
26 |
+
- absl-py==2.1.0
|
27 |
+
- aiofiles==23.2.1
|
28 |
+
- aiohappyeyeballs==2.4.0
|
29 |
+
- aiohttp==3.10.5
|
30 |
+
- aiosignal==1.3.1
|
31 |
+
- altair==5.4.0
|
32 |
+
- annotated-types==0.7.0
|
33 |
+
- antlr4-python3-runtime==4.9.3
|
34 |
+
- anyio==4.4.0
|
35 |
+
- async-timeout==4.0.3
|
36 |
+
- attrs==24.2.0
|
37 |
+
- av==10.0.0
|
38 |
+
- cachetools==5.5.0
|
39 |
+
- certifi==2024.7.4
|
40 |
+
- charset-normalizer==3.3.2
|
41 |
+
- click==8.1.7
|
42 |
+
- contourpy==1.3.0
|
43 |
+
- cycler==0.12.1
|
44 |
+
- decorator==4.4.2
|
45 |
+
- decord==0.6.0
|
46 |
+
- einops==0.6.1
|
47 |
+
- exceptiongroup==1.2.2
|
48 |
+
- fastapi==0.112.2
|
49 |
+
- ffmpy==0.4.0
|
50 |
+
- filelock==3.15.4
|
51 |
+
- fonttools==4.53.1
|
52 |
+
- frozenlist==1.4.1
|
53 |
+
- fsspec==2024.6.1
|
54 |
+
- ftfy==6.2.3
|
55 |
+
- future==1.0.0
|
56 |
+
- google-auth==2.34.0
|
57 |
+
- google-auth-oauthlib==1.0.0
|
58 |
+
- gradio==3.37.0
|
59 |
+
- gradio-client==0.7.1
|
60 |
+
- grpcio==1.66.0
|
61 |
+
- h11==0.14.0
|
62 |
+
- httpcore==1.0.5
|
63 |
+
- httpx==0.27.0
|
64 |
+
- huggingface-hub==0.24.6
|
65 |
+
- idna==3.8
|
66 |
+
- imageio==2.27.0
|
67 |
+
- imageio-ffmpeg==0.4.8
|
68 |
+
- importlib-metadata==8.4.0
|
69 |
+
- importlib-resources==6.4.4
|
70 |
+
- jinja2==3.1.4
|
71 |
+
- joblib==1.4.2
|
72 |
+
- jsonschema==4.23.0
|
73 |
+
- jsonschema-specifications==2023.12.1
|
74 |
+
- kiwisolver==1.4.5
|
75 |
+
- kornia==0.7.3
|
76 |
+
- kornia-rs==0.1.5
|
77 |
+
- lazy-loader==0.4
|
78 |
+
- lightning-utilities==0.11.6
|
79 |
+
- linkify-it-py==2.0.3
|
80 |
+
- markdown==3.7
|
81 |
+
- markdown-it-py==2.2.0
|
82 |
+
- markupsafe==2.1.5
|
83 |
+
- matplotlib==3.9.2
|
84 |
+
- mdit-py-plugins==0.3.3
|
85 |
+
- mdurl==0.1.2
|
86 |
+
- moviepy==1.0.3
|
87 |
+
- multidict==6.0.5
|
88 |
+
- mypy-extensions==1.0.0
|
89 |
+
- narwhals==1.6.0
|
90 |
+
- networkx==3.2.1
|
91 |
+
- numpy==1.23.5
|
92 |
+
- nvidia-cublas-cu11==11.10.3.66
|
93 |
+
- nvidia-cuda-nvrtc-cu11==11.7.99
|
94 |
+
- nvidia-cuda-runtime-cu11==11.7.99
|
95 |
+
- nvidia-cudnn-cu11==8.5.0.96
|
96 |
+
- oauthlib==3.2.2
|
97 |
+
- omegaconf==2.3.0
|
98 |
+
- open-clip-torch==2.17.1
|
99 |
+
- opencv-python==4.7.0.72
|
100 |
+
- orjson==3.10.7
|
101 |
+
- packaging==24.1
|
102 |
+
- pandas==2.2.2
|
103 |
+
- pillow==9.4.0
|
104 |
+
- pip==23.0.1
|
105 |
+
- proglog==0.1.10
|
106 |
+
- protobuf==3.20.3
|
107 |
+
- pyasn1==0.6.0
|
108 |
+
- pyasn1-modules==0.4.0
|
109 |
+
- pydantic==2.8.2
|
110 |
+
- pydantic-core==2.20.1
|
111 |
+
- pydub==0.25.1
|
112 |
+
- pyglet==1.5.0
|
113 |
+
- pygments==2.18.0
|
114 |
+
- pyparsing==3.1.4
|
115 |
+
- pyre-extensions==0.0.23
|
116 |
+
- python-dateutil==2.9.0.post0
|
117 |
+
- python-multipart==0.0.9
|
118 |
+
- pytorch-lightning==1.9.3
|
119 |
+
- pytz==2024.1
|
120 |
+
- pywavelets==1.6.0
|
121 |
+
- pyyaml==6.0
|
122 |
+
- referencing==0.35.1
|
123 |
+
- regex==2024.7.24
|
124 |
+
- requests==2.32.3
|
125 |
+
- requests-oauthlib==2.0.0
|
126 |
+
- roma==1.5.0
|
127 |
+
- rpds-py==0.20.0
|
128 |
+
- rsa==4.9
|
129 |
+
- scikit-image==0.20.0
|
130 |
+
- scikit-learn==1.2.2
|
131 |
+
- scipy==1.9.1
|
132 |
+
- semantic-version==2.10.0
|
133 |
+
- sentencepiece==0.2.0
|
134 |
+
- six==1.16.0
|
135 |
+
- sniffio==1.3.1
|
136 |
+
- starlette==0.38.2
|
137 |
+
- tensorboard==2.12.2
|
138 |
+
- tensorboard-data-server==0.7.2
|
139 |
+
- tensorboard-plugin-wit==1.8.1
|
140 |
+
- threadpoolctl==3.5.0
|
141 |
+
- tifffile==2024.8.24
|
142 |
+
- timm==0.6.13
|
143 |
+
- tokenizers==0.13.3
|
144 |
+
- torch==1.13.1
|
145 |
+
- torchmetrics==1.4.1
|
146 |
+
- torchvision==0.14.1
|
147 |
+
- tqdm==4.65.0
|
148 |
+
- transformers==4.28.1
|
149 |
+
- trimesh==4.4.3
|
150 |
+
- triton==3.0.0
|
151 |
+
- typing-extensions==4.12.2
|
152 |
+
- typing-inspect==0.9.0
|
153 |
+
- tzdata==2024.1
|
154 |
+
- uc-micro-py==1.0.3
|
155 |
+
- urllib3==2.2.2
|
156 |
+
- uvicorn==0.30.6
|
157 |
+
- wcwidth==0.2.13
|
158 |
+
- websockets==11.0.3
|
159 |
+
- werkzeug==3.0.4
|
160 |
+
- xformers==0.0.16
|
161 |
+
- yarl==1.9.4
|
162 |
+
- zipp==3.20.1
|
163 |
+
- spaces
|
164 |
+
- huggingface_hub
|
165 |
+
prefix: /opt/miniconda/envs/viewcrafter
|
run.sh
CHANGED
@@ -1,18 +1,6 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
--elevation=5 \
|
8 |
-
--seed 123 \
|
9 |
-
--d_theta -30 \
|
10 |
-
--d_phi 45 \
|
11 |
-
--d_r -.5 \
|
12 |
-
--ckpt_path ./checkpoints/model.ckpt \
|
13 |
-
--config configs/inference_pvd_1024.yaml \
|
14 |
-
--ddim_steps 50 \
|
15 |
-
--video_length 25 \
|
16 |
-
--device 'cuda:0' \
|
17 |
-
--height 576 --width 1024 \
|
18 |
-
--model_path ./checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
CONDA_ENV=$(head -1 /code/environment.yml | cut -d" " -f2)
|
3 |
+
eval "$(conda shell.bash hook)"
|
4 |
+
conda activate $CONDA_ENV
|
5 |
+
conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.7/download/linux-64/pytorch3d-0.7.7-py39_cu117_pyt200.tar.bz2
|
6 |
+
python app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|