fix: serve and train reuse the built image and expose GPUs correctly
- serve.sh/train.sh no longer pass --build on up/run; the build subcommand is the only path that rebuilds - compose services pin image: astrai:latest so run reuses the existing image instead of triggering a rebuild - runtime parsers leave CUDA_VISIBLE_DEVICES unset for gpu.devices: all; an empty string hid every GPU inside the container - server service reserves count: all GPUs so CUDA_VISIBLE_DEVICES performs the only filtering, matching the trainer - wrapper compose() strips an empty host CUDA_VISIBLE_DEVICES before invoking docker compose
This commit is contained in:
@@ -26,7 +26,7 @@ def test_runtime_exports_defaults(tmp_path):
|
||||
assert runtime["SERVE_CONTAINER_PORT"] == "8000"
|
||||
assert runtime["SERVE_PARAM_DIR"] == str((tmp_path / "params").resolve())
|
||||
assert runtime["SERVE_GPU_ENABLED"] == "true"
|
||||
assert runtime["CUDA_VISIBLE_DEVICES"] == ""
|
||||
assert "CUDA_VISIBLE_DEVICES" not in runtime
|
||||
assert runtime["SERVE_DEVICE"] == "cuda"
|
||||
assert runtime["CUDA_TAG"] == "cu128"
|
||||
assert runtime["SERVE_JOB_NAME"] == ""
|
||||
|
||||
Reference in New Issue
Block a user