Spaces:
Running on Zero
Running on Zero
cotyle-fix commited on
Commit ·
01d8d06
1
Parent(s): e568f84
Fix Space startup: install.sh deps + remove stray src/lakonlab gitlink
Browse files- install.sh: pin setuptools<82 (82 dropped pkg_resources, breaking
mmcv/mmgen source builds) and use --no-build-isolation so they compile
against the installed torch + setuptools
- install lakonlab with --no-deps (piFlow's own reqs conflict with my_req.txt)
and drop the -e editable flag that caused an interactive prompt -> EOFError
- align torch to my_req.txt (2.7.1) to avoid ABI mismatch in compiled exts
- remove accidental src/lakonlab gitlink (mode 160000, no .gitmodules)
- install.sh +30 -3
- src/lakonlab +0 -1
install.sh
CHANGED
|
@@ -1,5 +1,32 @@
|
|
| 1 |
#!/bin/bash
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
|
| 4 |
+
# --- Build prerequisites -----------------------------------------------------
|
| 5 |
+
# setuptools 82 (released 2026-02-08) removed the legacy `pkg_resources` module,
|
| 6 |
+
# which breaks the source builds of mmcv / mmgen (their setup.py still imports
|
| 7 |
+
# it). Keep a pre-82 setuptools, plus the tools needed to build native exts.
|
| 8 |
+
pip install "setuptools<82" wheel ninja
|
| 9 |
+
|
| 10 |
+
# Install torch first, at the SAME versions pinned in my_req.txt, so mmcv/mmgen
|
| 11 |
+
# are compiled against the exact torch used at runtime (otherwise their compiled
|
| 12 |
+
# extensions raise ABI / "undefined symbol" errors), and torch isn't downloaded
|
| 13 |
+
# twice.
|
| 14 |
+
pip install torch==2.7.1 torchvision==0.22.1
|
| 15 |
+
|
| 16 |
+
# --- piFlow (lakonlab) -------------------------------------------------------
|
| 17 |
+
# Install ONLY the `lakonlab` package, not piFlow's own dependencies: piFlow's
|
| 18 |
+
# requirements.txt pins (gradio 4.x, transformers 4.54, diffusers 0.35, ...)
|
| 19 |
+
# conflict with this Space's curated my_req.txt below. Dependencies are provided
|
| 20 |
+
# by my_req.txt instead.
|
| 21 |
+
#
|
| 22 |
+
# Also drop the `-e` (editable) flag: an editable VCS install clones into
|
| 23 |
+
# ./src/lakonlab and, when that path already exists, pip falls back to an
|
| 24 |
+
# interactive prompt ("(i)gnore/(w)ipe/(b)ackup") -> EOFError in the container.
|
| 25 |
+
pip install --no-deps \
|
| 26 |
+
"lakonlab @ git+https://github.com/Lakonik/piFlow.git@b1ef16e5e305251bccdfeac2a0e3d0ef339b974a"
|
| 27 |
+
|
| 28 |
+
# --- Remaining dependencies --------------------------------------------------
|
| 29 |
+
# Disable build isolation so mmcv/mmgen build against the torch + setuptools<82
|
| 30 |
+
# installed above, instead of a fresh isolated build env that would pull the
|
| 31 |
+
# pkg_resources-less setuptools 82.
|
| 32 |
+
pip install --no-build-isolation -r my_req.txt
|
src/lakonlab
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
Subproject commit b1ef16e5e305251bccdfeac2a0e3d0ef339b974a
|
|
|
|
|
|