Fix Docker entrypoint line endings and API upload dependency
Browse files- .gitattributes +6 -1
- Dockerfile +3 -3
- entrypoint.sh +19 -19
.gitattributes
CHANGED
|
@@ -3,4 +3,9 @@
|
|
| 3 |
wheels/*.whl filter=lfs diff=lfs merge=lfs -text
|
| 4 |
|
| 5 |
# Sample output videos shown as previews in the Gradio UI.
|
| 6 |
-
previews/*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
wheels/*.whl filter=lfs diff=lfs merge=lfs -text
|
| 4 |
|
| 5 |
# Sample output videos shown as previews in the Gradio UI.
|
| 6 |
+
previews/*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
|
| 8 |
+
# Shell entrypoints must stay LF-only inside Docker/Linux.
|
| 9 |
+
*.sh text eol=lf
|
| 10 |
+
Dockerfile text eol=lf
|
| 11 |
+
*.py text eol=lf
|
Dockerfile
CHANGED
|
@@ -101,9 +101,9 @@ RUN uv pip install \
|
|
| 101 |
|
| 102 |
# DA3's undeclared transitive runtime deps (addict missing from its pyproject;
|
| 103 |
# these aren't resolved when we install from local wheels with pre-compiled .so).
|
| 104 |
-
RUN uv pip install \
|
| 105 |
-
addict evo e3nn plyfile pillow-heif moviepy open3d typer \
|
| 106 |
-
kornia pycolmap trimesh fastapi uvicorn gradio
|
| 107 |
|
| 108 |
# Repin huggingface_hub < 1.0 (chain installs can bump past 1.0 and break
|
| 109 |
# transformers) and gdown < 6 (6.0 removed the `fuzzy` kwarg VIPE uses).
|
|
|
|
| 101 |
|
| 102 |
# DA3's undeclared transitive runtime deps (addict missing from its pyproject;
|
| 103 |
# these aren't resolved when we install from local wheels with pre-compiled .so).
|
| 104 |
+
RUN uv pip install \
|
| 105 |
+
addict evo e3nn plyfile pillow-heif moviepy open3d typer \
|
| 106 |
+
kornia pycolmap trimesh fastapi uvicorn gradio python-multipart
|
| 107 |
|
| 108 |
# Repin huggingface_hub < 1.0 (chain installs can bump past 1.0 and break
|
| 109 |
# transformers) and gdown < 6 (6.0 removed the `fuzzy` kwarg VIPE uses).
|
entrypoint.sh
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
#!/usr/bin/env bash
|
| 2 |
-
# Container entrypoint for the Lyra-2 HF Space.
|
| 3 |
-
# 1. Download Lyra-2.0 checkpoints to the /data persistent volume (idempotent).
|
| 4 |
-
# 2. Launch the Gradio app.
|
| 5 |
-
set -euo pipefail
|
| 6 |
-
|
| 7 |
-
# expandable_segments reduces fragmentation when the resident Lyra-2 diffusion
|
| 8 |
-
# net is swapped between GPU/CPU to make room for DA3's stage-2 GS recon pass.
|
| 9 |
-
# Without this, we can still OOM even though aggregate free memory is enough.
|
| 10 |
-
export PYTORCH_CUDA_ALLOC_CONF=${PYTORCH_CUDA_ALLOC_CONF:-expandable_segments:True}
|
| 11 |
-
|
| 12 |
-
cd /home/user/app
|
| 13 |
-
|
| 14 |
-
# The checkpoint downloader is idempotent — on warm starts with a populated
|
| 15 |
-
# /data volume it exits in seconds. On the first cold start after the Space
|
| 16 |
-
# is provisioned it takes 20-40 min.
|
| 17 |
-
python download_checkpoints.py
|
| 18 |
-
|
| 19 |
-
exec python app.py
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Container entrypoint for the Lyra-2 HF Space.
|
| 3 |
+
# 1. Download Lyra-2.0 checkpoints to the /data persistent volume (idempotent).
|
| 4 |
+
# 2. Launch the Gradio app.
|
| 5 |
+
set -euo pipefail
|
| 6 |
+
|
| 7 |
+
# expandable_segments reduces fragmentation when the resident Lyra-2 diffusion
|
| 8 |
+
# net is swapped between GPU/CPU to make room for DA3's stage-2 GS recon pass.
|
| 9 |
+
# Without this, we can still OOM even though aggregate free memory is enough.
|
| 10 |
+
export PYTORCH_CUDA_ALLOC_CONF=${PYTORCH_CUDA_ALLOC_CONF:-expandable_segments:True}
|
| 11 |
+
|
| 12 |
+
cd /home/user/app
|
| 13 |
+
|
| 14 |
+
# The checkpoint downloader is idempotent — on warm starts with a populated
|
| 15 |
+
# /data volume it exits in seconds. On the first cold start after the Space
|
| 16 |
+
# is provisioned it takes 20-40 min.
|
| 17 |
+
python download_checkpoints.py
|
| 18 |
+
|
| 19 |
+
exec python app.py
|