← back to Exo
add scripts (#1401)
c8371349d58f39405f316456bcfc8335564c79bc · 2026-02-06 11:06:40 +0000 · Evan Quiney
allow running exo-bench and the headless runner from nix
Files touched
M pyproject.tomlM python/parts.nix
Diff
commit c8371349d58f39405f316456bcfc8335564c79bc
Author: Evan Quiney <evanev7@gmail.com>
Date: Fri Feb 6 11:06:40 2026 +0000
add scripts (#1401)
allow running exo-bench and the headless runner from nix
---
pyproject.toml | 2 --
python/parts.nix | 26 ++++++++++++++++++--------
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 3f019419..f47c1f77 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,8 +31,6 @@ dependencies = [
]
[project.scripts]
-exo-master = "exo.master.main:main"
-exo-worker = "exo.worker.main:main"
exo = "exo.main:main"
# dependencies only required for development
diff --git a/python/parts.nix b/python/parts.nix
index 9d5580ae..d3eea784 100644
--- a/python/parts.nix
+++ b/python/parts.nix
@@ -59,6 +59,16 @@
}
);
+ mkPythonScript = name: path: pkgs.writeShellApplication {
+ inherit name;
+ runtimeInputs = [ exoVenv ];
+ runtimeEnv = {
+ EXO_DASHBOARD_DIR = self'.packages.dashboard;
+ EXO_RESOURCES_DIR = inputs.self + /resources;
+ };
+ text = ''python ${path}'';
+ };
+
exoPackage = pkgs.runCommand "exo"
{
nativeBuildInputs = [ pkgs.makeWrapper ];
@@ -66,13 +76,11 @@
''
mkdir -p $out/bin
- # Create wrapper scripts
- for script in exo exo-master exo-worker; do
- makeWrapper ${exoVenv}/bin/$script $out/bin/$script \
- --set EXO_DASHBOARD_DIR ${self'.packages.dashboard} \
- --set EXO_RESOURCES_DIR ${inputs.self + "/resources"} \
- ${lib.optionalString pkgs.stdenv.isDarwin "--prefix PATH : ${pkgs.macmon}/bin"}
- done
+ # Create wrapper script
+ makeWrapper ${exoVenv}/bin/exo $out/bin/exo \
+ --set EXO_DASHBOARD_DIR ${self'.packages.dashboard} \
+ --set EXO_RESOURCES_DIR ${inputs.self + /resources} \
+ ${lib.optionalString pkgs.stdenv.hostPlatform.isDarwin "--prefix PATH : ${pkgs.macmon}/bin"}
'';
in
{
@@ -81,13 +89,15 @@
exo = exoPackage;
# Test environment for running pytest outside of Nix sandbox (needs GPU access)
exo-test-env = testVenv;
+ exo-bench = mkPythonScript "exo-bench" (inputs.self + /bench/exo_bench.py);
+ exo-distributed-test = mkPythonScript "exo-distributed-test" (inputs.self + /tests/headless_runner.py);
};
checks = {
# Ruff linting (works on all platforms)
lint = pkgs.runCommand "ruff-lint" { } ''
export RUFF_CACHE_DIR="$TMPDIR/ruff-cache"
- ${pkgs.ruff}/bin/ruff check ${inputs.self}/
+ ${pkgs.ruff}/bin/ruff check ${inputs.self}
touch $out
'';
};
← 6b907398 cancel downloads for deleted instances (#1393)
·
back to Exo
·
fix: retry downloads on transient errors instead of breaking 9f502793 →