Drexubery commited on
Commit
06a530c
1 Parent(s): a6532e3
Files changed (5) hide show
  1. Dockerfile +0 -29
  2. app.py +3 -1
  3. configs/infer_config.py +1 -1
  4. environment.yaml +0 -165
  5. run.sh +0 -6
Dockerfile DELETED
@@ -1,29 +0,0 @@
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"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -6,7 +6,6 @@ import sys
6
  # os.system("pip install -v -v -v 'git+https://github.com/facebookresearch/pytorch3d.git@stable'")
7
  # os.system("cd pytorch3d && pip install -e . && cd ..")
8
  os.system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git'")
9
- os.system("wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/")
10
 
11
 
12
  import gradio as gr
@@ -32,6 +31,9 @@ def download_model():
32
  local_file = os.path.join('./checkpoints/', filename)
33
  if not os.path.exists(local_file):
34
  hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/', force_download=True)
 
 
 
35
 
36
 
37
 
 
6
  # os.system("pip install -v -v -v 'git+https://github.com/facebookresearch/pytorch3d.git@stable'")
7
  # os.system("cd pytorch3d && pip install -e . && cd ..")
8
  os.system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git'")
 
9
 
10
 
11
  import gradio as gr
 
31
  local_file = os.path.join('./checkpoints/', filename)
32
  if not os.path.exists(local_file):
33
  hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/', force_download=True)
34
+
35
+ REPO_ID = 'naver/DUSt3R_ViTLarge_BaseDecoder_512_dpt'
36
+
37
 
38
 
39
 
configs/infer_config.py CHANGED
@@ -48,7 +48,7 @@ def get_parser():
48
  parser.add_argument("--n_samples", type=int, default=1, help="num of samples per prompt")
49
 
50
  ## dust3r
51
- parser.add_argument('--model_path', type=str, default='./checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth', help='The path of the model')
52
  parser.add_argument('--batch_size', default=1)
53
  parser.add_argument('--schedule', type=str, default='linear')
54
  parser.add_argument('--niter', default=300)
 
48
  parser.add_argument("--n_samples", type=int, default=1, help="num of samples per prompt")
49
 
50
  ## dust3r
51
+ parser.add_argument('--model_path', type=str, default='./DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth', help='The path of the model')
52
  parser.add_argument('--batch_size', default=1)
53
  parser.add_argument('--schedule', type=str, default='linear')
54
  parser.add_argument('--niter', default=300)
environment.yaml DELETED
@@ -1,165 +0,0 @@
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 DELETED
@@ -1,6 +0,0 @@
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