Spaces:
Running
on
Zero
Running
on
Zero
π¦ refactor: switch to gradio space
Browse files- Dockerfile +0 -37
- README.md +4 -1
- app.py +3 -0
- packages.txt +5 -0
- requirements.txt +31 -0
- run.sh +16 -0
Dockerfile
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
FROM python:3.11
|
2 |
-
|
3 |
-
RUN apt-get update -y && \
|
4 |
-
apt-get install -y libegl1-mesa-dev libgl1-mesa-dev libxi6 libxkbcommon-x11-0 git-lfs && \
|
5 |
-
apt-get clean && \
|
6 |
-
apt-get autoremove
|
7 |
-
|
8 |
-
RUN useradd -m -u 1000 user
|
9 |
-
USER user
|
10 |
-
ENV HOME=/home/user \
|
11 |
-
PATH=/home/user/.local/bin:$PATH
|
12 |
-
|
13 |
-
WORKDIR $HOME
|
14 |
-
COPY --chown=user . .
|
15 |
-
|
16 |
-
RUN --mount=type=secret,id=GH_TOKEN,mode=0444,required=true \
|
17 |
-
git config --global url.https://$(cat /run/secrets/GH_TOKEN)@github.com/.insteadOf https://github.com/ && \
|
18 |
-
git clone --recursive https://github.com/jasongzy/3DShape2VecSet app
|
19 |
-
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
20 |
-
git config --global url.https://jasongzy:$(cat /run/secrets/HF_TOKEN)@huggingface.co/.insteadOf https://huggingface.co/ && \
|
21 |
-
git lfs install && \
|
22 |
-
git clone https://huggingface.co/jasongzy/Make-It-Animatable model && \
|
23 |
-
GIT_LFS_SKIP_SMUDGE=1 git clone --recursive https://huggingface.co/datasets/jasongzy/Mixamo Mixamo && \
|
24 |
-
cd Mixamo && \
|
25 |
-
git lfs pull -I animation && \
|
26 |
-
git lfs pull -I "bones*.fbx" && \
|
27 |
-
rm ~/.gitconfig
|
28 |
-
|
29 |
-
WORKDIR $HOME/app
|
30 |
-
|
31 |
-
RUN mv ../model/data/* ./data/ && \
|
32 |
-
mv ../model/output/* ./output/ && \
|
33 |
-
rm -r ../model && \
|
34 |
-
mv ../Mixamo ./data/ && \
|
35 |
-
pip install -r requirements-demo.txt
|
36 |
-
|
37 |
-
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -3,7 +3,10 @@ title: Make It Animatable
|
|
3 |
emoji: π
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
6 |
-
sdk:
|
|
|
|
|
|
|
7 |
pinned: false
|
8 |
license: cc-by-nc-4.0
|
9 |
short_description: Authoring Animation-Ready 3D Characters with One Click
|
|
|
3 |
emoji: π
|
4 |
colorFrom: indigo
|
5 |
colorTo: red
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 5.7.1
|
8 |
+
python_version: 3.11
|
9 |
+
app_file: app.py
|
10 |
pinned: false
|
11 |
license: cc-by-nc-4.0
|
12 |
short_description: Authoring Animation-Ready 3D Characters with One Click
|
app.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
os.system("bash run.sh")
|
packages.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
libegl1-mesa-dev
|
2 |
+
libgl1-mesa-dev
|
3 |
+
libxi6
|
4 |
+
libxkbcommon-x11-0
|
5 |
+
git-lfs
|
requirements.txt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# conda create -n dev python=3.11
|
2 |
+
# conda activate dev
|
3 |
+
|
4 |
+
# conda install pytorch==2.0.1 torchvision==0.15.2 pytorch-cuda=11.8 -c pytorch -c nvidia
|
5 |
+
--extra-index-url https://download.pytorch.org/whl/cu118
|
6 |
+
torch==2.0.1
|
7 |
+
torchvision==0.15.2
|
8 |
+
|
9 |
+
einops
|
10 |
+
timm
|
11 |
+
-f https://data.pyg.org/whl/torch-2.0.1+cu118.html
|
12 |
+
torch-cluster
|
13 |
+
PyMCubes
|
14 |
+
|
15 |
+
bpy==4.2.0
|
16 |
+
fake-bpy-module
|
17 |
+
gradio>=5.0
|
18 |
+
ipykernel
|
19 |
+
ipympl
|
20 |
+
matplotlib
|
21 |
+
numpy~=1.26.4
|
22 |
+
plyfile
|
23 |
+
potpourri3d
|
24 |
+
shapely
|
25 |
+
tensorboard~=2.11.2
|
26 |
+
tqdm
|
27 |
+
trimesh
|
28 |
+
# git+https://github.com/facebookresearch/pytorch3d.git@stable
|
29 |
+
# pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu118_pyt201/download.html
|
30 |
+
--extra-index-url https://miropsota.github.io/torch_packages_builder
|
31 |
+
pytorch3d==0.7.7+pt2.0.1cu118
|
run.sh
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
git config --global url.https://$GH_TOKEN@github.com/.insteadOf https://github.com/ && \
|
3 |
+
git clone --recursive https://github.com/jasongzy/3DShape2VecSet app && \
|
4 |
+
git config --global url.https://jasongzy:$HF_TOKEN@huggingface.co/.insteadOf https://huggingface.co/ && \
|
5 |
+
git lfs install && \
|
6 |
+
git clone https://huggingface.co/jasongzy/Make-It-Animatable model && \
|
7 |
+
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/datasets/jasongzy/Mixamo app/data/Mixamo && \
|
8 |
+
cd app/data/Mixamo && \
|
9 |
+
git lfs pull -I animation && \
|
10 |
+
git lfs pull -I 'bones*.fbx' && \
|
11 |
+
rm ~/.gitconfig && \
|
12 |
+
cd ../.. && \
|
13 |
+
mv ../model/data/* ./data/ && \
|
14 |
+
mv ../model/output/* ./output/ && \
|
15 |
+
rm -r ../model && \
|
16 |
+
GRADIO_SSR_MODE=False python app.py
|