renan3989 bennyguo commited on
Commit
425dcb9
·
0 Parent(s):

Duplicate from bennyguo/threestudio

Browse files

Co-authored-by: Yuan-Chen Guo <[email protected]>

Files changed (5) hide show
  1. .gitattributes +35 -0
  2. Dockerfile +66 -0
  3. README.md +12 -0
  4. app.py +10 -0
  5. requirements.txt +40 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reference:
2
+ # https://github.com/cvpaperchallenge/Ascender
3
+ # https://github.com/nerfstudio-project/nerfstudio
4
+
5
+ FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
6
+
7
+ ARG USER_NAME=dreamer
8
+ ARG GROUP_NAME=dreamers
9
+ ARG UID=1000
10
+ ARG GID=1000
11
+
12
+ # Set compute capability for nerfacc and tiny-cuda-nn
13
+ # See https://developer.nvidia.com/cuda-gpus and limit number to speed-up build
14
+ ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX"
15
+ ENV TCNN_CUDA_ARCHITECTURES=90;89;86;80;75;70;61;60
16
+ # Speed-up build for RTX 30xx
17
+ # ENV TORCH_CUDA_ARCH_LIST="8.6"
18
+ # ENV TCNN_CUDA_ARCHITECTURES=86
19
+ # Speed-up build for RTX 40xx
20
+ # ENV TORCH_CUDA_ARCH_LIST="8.9"
21
+ # ENV TCNN_CUDA_ARCHITECTURES=89
22
+
23
+ ENV CUDA_HOME=/usr/local/cuda
24
+ ENV PATH=${CUDA_HOME}/bin:/home/${USER_NAME}/.local/bin:${PATH}
25
+ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
26
+ ENV LIBRARY_PATH=${CUDA_HOME}/lib64/stubs:${LIBRARY_PATH}
27
+
28
+ # apt install by root user
29
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
30
+ build-essential \
31
+ curl \
32
+ git \
33
+ libegl1-mesa-dev \
34
+ libgl1-mesa-dev \
35
+ libgles2-mesa-dev \
36
+ libglib2.0-0 \
37
+ libsm6 \
38
+ libxext6 \
39
+ libxrender1 \
40
+ python-is-python3 \
41
+ python3.10-dev \
42
+ python3-pip \
43
+ wget \
44
+ && rm -rf /var/lib/apt/lists/*
45
+
46
+ # Change user to non-root user
47
+ RUN groupadd -g ${GID} ${GROUP_NAME} \
48
+ && useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME}
49
+ USER ${USER_NAME}
50
+
51
+ RUN pip install --upgrade pip setuptools ninja
52
+ RUN pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118
53
+ # Install nerfacc and tiny-cuda-nn before installing requirements.txt
54
+ # because these two installations are time consuming and error prone
55
+ RUN pip install git+https://github.com/KAIR-BAIR/[email protected]
56
+ RUN pip install git+https://github.com/NVlabs/tiny-cuda-nn.git#subdirectory=bindings/torch
57
+
58
+ COPY requirements.txt /tmp
59
+ RUN cd /tmp && pip install -r requirements.txt
60
+
61
+ # avoid caching the old version
62
+ ADD "https://api.github.com/repos/threestudio-project/threestudio/commits?per_page=1" latest_commit
63
+ RUN git clone https://github.com/threestudio-project/threestudio.git /home/${USER_NAME}/threestudio
64
+ WORKDIR /home/${USER_NAME}/threestudio
65
+ RUN git checkout c2f4c21
66
+ CMD ["python", "gradio_app.py", "launch", "--listen", "--hf-space"]
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: threestudio
3
+ emoji: ⚡
4
+ colorFrom: yellow
5
+ colorTo: gray
6
+ sdk: docker
7
+ pinned: false
8
+ license: apache-2.0
9
+ duplicated_from: bennyguo/threestudio
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+
4
+ def greet(name):
5
+ return "Hello " + name + "!!"
6
+
7
+
8
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
9
+ iface.launch()
10
+
requirements.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ lightning==2.0.0
2
+ omegaconf==2.3.0
3
+ jaxtyping
4
+ typeguard
5
+ git+https://github.com/KAIR-BAIR/[email protected]
6
+ git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
7
+ diffusers
8
+ transformers
9
+ accelerate
10
+ opencv-python
11
+ tensorboard
12
+ matplotlib
13
+ imageio>=2.28.0
14
+ imageio[ffmpeg]
15
+ git+https://github.com/NVlabs/nvdiffrast.git
16
+ libigl
17
+ xatlas
18
+ trimesh[easy]
19
+ networkx
20
+ pysdf
21
+ PyMCubes
22
+ wandb
23
+ gradio
24
+ git+https://github.com/ashawkey/envlight.git
25
+
26
+ # deepfloyd
27
+ xformers
28
+ bitsandbytes
29
+ sentencepiece
30
+ safetensors
31
+ huggingface_hub
32
+
33
+ # for zero123
34
+ einops
35
+ kornia
36
+ taming-transformers-rom1504
37
+ git+https://github.com/openai/CLIP.git
38
+
39
+ #controlnet
40
+ controlnet_aux