mirror of
https://github.com/hanzoai/laya.git
synced 2026-10-30 19:33:31 +00:00
laya-serve published its port on every host interface while LAYA_API_KEY is empty by default, which served an unauthenticated API to the local network. The host side now defaults to 127.0.0.1. LAYA_BIND_ADDRESS changes the host address. A healthcheck on /health makes up --wait return once the server can answer, which includes any preloaded checkpoints. The Docker workflow validates the HTTP Compose combinations and starts laya-serve to check binding, health and bearer auth. The comments no longer say a Compose override replaces the build block: laya-serve needs its own CUDA entry because it is a separate service.
33 lines
927 B
YAML
33 lines
927 B
YAML
# Use with compose.yaml, and with compose.http.yaml when serving over HTTP. The
|
|
# `laya-serve` entry repeats the CUDA build args and device reservation because it is
|
|
# a separate service: overrides for `laya` never reach it, so it would serve on CPU.
|
|
services:
|
|
laya:
|
|
build:
|
|
args:
|
|
TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu128}"
|
|
environment:
|
|
LAYA_DEVICE: "${LAYA_DEVICE:-cuda}"
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
device_ids: ["${LAYA_GPU_ID:-0}"]
|
|
capabilities: [gpu]
|
|
|
|
laya-serve:
|
|
build:
|
|
context: .
|
|
args:
|
|
TORCH_INDEX: "${LAYA_TORCH_INDEX:-cu128}"
|
|
environment:
|
|
LAYA_DEVICE: "${LAYA_DEVICE:-cuda}"
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
device_ids: ["${LAYA_GPU_ID:-0}"]
|
|
capabilities: [gpu]
|