manav0506 commited on
Commit
185fd48
Β·
1 Parent(s): 0796c7e

Sync deps: Dockerfile system deps + ffmpeg, single pip flow

Browse files
Files changed (3) hide show
  1. Dockerfile +7 -3
  2. README.md +1 -1
  3. requirements-docker.txt +26 -0
Dockerfile CHANGED
@@ -17,11 +17,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
17
  libxcb-xfixes0 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
- COPY requirements.txt .
21
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
22
  # torchmcubes: build deps for --no-build-isolation (scikit-build-core, pybind11, ninja)
23
  RUN pip install --no-cache-dir scikit-build-core pybind11 ninja
24
- # torchmcubes must be built after torch is installed (CMake needs TorchConfig.cmake)
25
  RUN pip install --no-cache-dir --no-build-isolation "git+https://github.com/tatsy/torchmcubes.git"
26
 
27
  # TripoSR repo (model downloaded at runtime from Hugging Face)
 
17
  libxcb-xfixes0 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ COPY requirements.txt requirements-docker.txt ./
21
+ # Install CPU-only PyTorch first so torchmcubes can build without CUDA (Docker build has no GPU/CUDA).
22
+ # If we install default torch (CUDA wheel), CMake fails: "Your installed Caffe2 version uses CUDA but I cannot find CUDA".
23
+ RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
24
+ # Install rest of deps without touching torch/torchvision (requirements-docker.txt omits them)
25
+ RUN pip install --no-cache-dir -r requirements-docker.txt
26
  # torchmcubes: build deps for --no-build-isolation (scikit-build-core, pybind11, ninja)
27
  RUN pip install --no-cache-dir scikit-build-core pybind11 ninja
28
+ # torchmcubes must be built after torch is installed (CMake needs TorchConfig.cmake); CPU Torch = no CUDA required at build.
29
  RUN pip install --no-cache-dir --no-build-isolation "git+https://github.com/tatsy/torchmcubes.git"
30
 
31
  # TripoSR repo (model downloaded at runtime from Hugging Face)
README.md CHANGED
@@ -46,7 +46,7 @@ After that, run Skybox or Mesh again; the model will download on first use.
46
  - **"Could not load Stable Diffusion"** β†’ Add `HF_TOKEN` in Settings β†’ Variables and secrets, then restart the Space.
47
  - **"TripoSR not found"** β†’ Rebuild the Space (the Dockerfile clones TripoSR). If you forked the Space, ensure the Dockerfile and `scripts/` are present.
48
  - **Mesh generation times out** β†’ Use **Mesh resolution 256** and disable **Bake texture atlas** for a faster run; GPU Spaces are much faster than CPU.
49
- - **Build fails on torchmcubes** β†’ The Dockerfile installs torch first, then builds torchmcubes with `--no-build-isolation` so CMake finds Torch. Do not change the order of `pip install` steps.
50
 
51
  ---
52
 
 
46
  - **"Could not load Stable Diffusion"** β†’ Add `HF_TOKEN` in Settings β†’ Variables and secrets, then restart the Space.
47
  - **"TripoSR not found"** β†’ Rebuild the Space (the Dockerfile clones TripoSR). If you forked the Space, ensure the Dockerfile and `scripts/` are present.
48
  - **Mesh generation times out** β†’ Use **Mesh resolution 256** and disable **Bake texture atlas** for a faster run; GPU Spaces are much faster than CPU.
49
+ - **Build fails on torchmcubes** β†’ The Dockerfile installs **CPU-only PyTorch** first (`--index-url https://download.pytorch.org/whl/cpu`) so torchmcubes can build without CUDA (Docker build has no GPU). Do not change the order of `pip install` steps; do not remove the CPU-index torch install or the build will fail with "Your installed Caffe2 version uses CUDA but I cannot find CUDA".
50
 
51
  ---
52
 
requirements-docker.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Same as requirements.txt but WITHOUT torch/torchvision (installed from CPU index in Dockerfile first)
2
+ # Evoneural MVP – Space (Docker build)
3
+
4
+ # Core (torch/torchvision installed separately from PyTorch CPU index)
5
+ Pillow>=10.0.0
6
+ numpy>=1.24.0
7
+
8
+ # Streamlit
9
+ streamlit>=1.28.0
10
+
11
+ # Stable Diffusion (skybox + text-to-image for mesh)
12
+ diffusers>=0.25.0
13
+ transformers>=4.35.0
14
+ accelerate>=0.25.0
15
+ safetensors>=0.4.0
16
+
17
+ # TripoSR / mesh pipeline
18
+ huggingface-hub>=0.20.0
19
+ rembg[cpu]>=2.0.50
20
+ xatlas>=0.0.9
21
+ trimesh>=4.0.0
22
+ einops>=0.7.0
23
+ omegaconf>=2.3.0
24
+ moderngl>=5.10.0
25
+ imageio[ffmpeg]>=2.33.0
26
+ scipy>=1.10.0