Activate Strata v0.2.3 with verified staged native build

This commit is contained in:
Mikei386 committed 2026-10-23 17:45:35 +02:00
1 parent 1892303c7f
commit 9abee55397
9 files changed
+319 -6

No files matched your search

+8 -3
View File
@@ -34,11 +34,16 @@ def install(runtime, storage):
partial.unlink(missing_ok=True)
raise ValueError('Projector size or checksum differs from original source')
os.replace(partial, target)
cmake = source / '.venv/bin/cmake'
# Upstream may reuse system CMake instead of installing it into the venv.
python = source / '.venv/bin/python'
env = dict(os.environ, PATH=str(python.parent) + os.pathsep + os.environ.get('PATH', ''))
tools = subprocess.check_output([str(python), '-c',
'import setup,json; print(json.dumps(list(map(str,setup.ensure_build_tools()))))'],
cwd=source, env=env, text=True)
cmake, ninja = map(Path, json.loads(tools.strip().splitlines()[-1]))
build = source / 'build-vision-cpu'
env = dict(os.environ, PATH=str(cmake.parent) + os.pathsep + os.environ.get('PATH', ''))
subprocess.run([str(cmake), '-S', str(source / 'tools/vision'), '-B', str(build),
'-G', 'Ninja', '-DCMAKE_BUILD_TYPE=Release',
'-G', 'Ninja', '-DCMAKE_MAKE_PROGRAM=' + str(ninja), '-DCMAKE_BUILD_TYPE=Release',
'-DLLAMA_DIR=' + str(source / 'third_party/llama.cpp'),
'-DSTRATA_VISION_CUDA=OFF', '-DSTRATA_PORTABLE=ON'], check=True, env=env)
subprocess.run([str(cmake), '--build', str(build), '--target', 'strata-vision', '-j', '2'], check=True, env=env)