Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

fix(docker): default the CUDA compose path to cu130, which has the pinned torch

Nandakishor073afac82616
diff --git a/compose.cuda.yaml b/compose.cuda.yaml
index fbdb90db..27d9b202 100644
--- a/compose.cuda.yaml
+++ b/compose.cuda.yaml
@@ -5,7 +5,11 @@ services:
laya:
build:
args:
- TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu128}"
+ # cu130, not cu128: compose.yaml pins TORCH_VERSION 2.14.0 and the cu128 index has no
+ # 2.14.0 wheel (its newest is 2.11.0), so the documented CUDA path could not resolve its
+ # own pin (#971). cu126 also carries 2.14.0; cu130 is chosen because docker.yml already
+ # builds the CUDA images with it, so Compose and CI now agree.
+ TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu130}"
environment:
LAYA_DEVICE: "${LAYA_DEVICE:-cuda}"
# The runtime reads these when it picks the autocast dtype; empty keeps the checkpoint's
@@ -24,7 +28,7 @@ services:
build:
context: .
args:
- TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu128}"
+ TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu130}"
environment:
LAYA_DEVICE: "${LAYA_DEVICE:-cuda}"
# The runtime reads these when it picks the autocast dtype; empty keeps the checkpoint's
diff --git a/docs/docker.md b/docs/docker.md
index db137bdb..e89f2321 100644
--- a/docs/docker.md
+++ b/docs/docker.md
@@ -82,7 +82,7 @@ work with `docker run -e`; Compose-only settings are identified below.
| `HF_HOME` | `/home/laya/.cache/huggingface` | Cache path; see mount requirement below |
| `LAYA_CACHE_VOLUME` | project model cache | **Compose only:** named cache volume |
| `LAYA_GPU_ID` | `0` | **Compose only:** NVIDIA device index or UUID |
-| `LAYA_TORCH_INDEX` | `cpu` / `cu128` / `cu130` | **Compose build:** PyTorch wheel index |
+| `LAYA_TORCH_INDEX` | `cu130` (CUDA) / `cpu` | **Compose build:** PyTorch wheel index. `cu126` also carries the pinned torch; `cu128` does not |
| `LAYA_TORCH_VERSION` | `2.14.0` | **Compose build:** pinned PyTorch version |
Compose forwards the runtime variables except `HF_HOME`, which stays aligned
@@ -90,7 +90,7 @@ with its fixed cache mount, and except `LAYA_MPS_AMP_MIN_ROWS`, the MPS row gate
which no image here can reach because no container here can select MPS.
If overriding `HF_HOME` in `docker run` or your own
Compose file, provide a matching mount writable by UID 10001. Direct Docker
-builds select PyTorch with `--build-arg TORCH_INDEX=cu128`; runtime `-e` cannot
+builds select PyTorch with `--build-arg TORCH_INDEX=cu130`; runtime `-e` cannot
change the installed wheel.
```bash
diff --git a/tests/test_packaging.py b/tests/test_packaging.py
index e4274bf7..7199fca4 100644
--- a/tests/test_packaging.py
+++ b/tests/test_packaging.py
@@ -369,7 +369,7 @@ check_true("compose.cuda/covers laya-serve too",
re.search(r"^\s{2}laya-serve:", cuda, re.M) is not None,
"compose.cuda.yaml does not mention laya-serve, so GPU serving would be CPU")
check("compose.cuda/repeats the torch index for the base service",
- len(re.findall(r'TORCH_INDEX: "\$\{LAYA_TORCH_INDEX:-cu128\}"', cuda)), 2)
+ len(re.findall(r'TORCH_INDEX: "\$\{LAYA_TORCH_INDEX:-cu130\}"', cuda)), 2)
check("compose.cuda/repeats the device reservation for both services",
len(re.findall(r"driver: nvidia", cuda)), 2)
check_true("compose.cuda/no stale reference to a missing file",