Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

install: ship version.py to libexec and make the launcher's version import survive its absence (#575)

ZacharyZcR94917709a067
diff --git a/c/Makefile b/c/Makefile
index c61d6485..6860906b 100644
--- a/c/Makefile
+++ b/c/Makefile
@@ -512,7 +512,7 @@ install: colibri$(EXE) olmoe$(EXE)
$(INSTALL) -m 755 coli $(DESTDIR)$(BINDIR)/coli
$(INSTALL) -m 755 colibri$(EXE) $(DESTDIR)$(LIBEXECDIR)/colibri$(EXE)
$(INSTALL) -m 755 olmoe$(EXE) $(DESTDIR)$(LIBEXECDIR)/olmoe$(EXE)
- $(INSTALL) -m 644 resource_plan.py doctor.py openai_server.py $(DESTDIR)$(LIBEXECDIR)/
+ $(INSTALL) -m 644 resource_plan.py doctor.py openai_server.py version.py $(DESTDIR)$(LIBEXECDIR)/
$(INSTALL) -m 644 tools/*.py $(DESTDIR)$(LIBEXECDIR)/tools/
uninstall:
diff --git a/c/coli b/c/coli
index 5864e689..8f56d068 100755
--- a/c/coli
+++ b/c/coli
@@ -44,7 +44,18 @@ if sys.platform == "win32":
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, HERE)
-from version import __version__ as _version
+# version.py sits next to this script in a source checkout, but an installed
+# layout puts the launcher in $(PREFIX)/bin while the support modules live in
+# $(PREFIX)/libexec/colibri — and a packager may strip it entirely (#575,
+# FreeBSD port). The launcher must never crash over a version string.
+try:
+ from version import __version__ as _version
+except ModuleNotFoundError:
+ sys.path.insert(0, os.path.join(os.path.dirname(HERE), "libexec", "colibri"))
+ try:
+ from version import __version__ as _version
+ except ModuleNotFoundError:
+ _version = "unknown"
# Run-in-place (source checkout, "cd c && ./coli ..."): the engine, the
# support modules (resource_plan.py, doctor.py, openai_server.py) and