fix(omnivoice): join internal network and fix GPU detection race
Этот коммит содержится в:
@@ -2,6 +2,18 @@
|
||||
# Starts the FastAPI server; model weights download on first request into /app/models
|
||||
set -e
|
||||
|
||||
# wait for GPU: torch.cuda.is_available() caches its first (possibly premature) result
|
||||
if [ -e /dev/kfd ]; then
|
||||
echo "ROCm device detected, waiting for GPU to become available..."
|
||||
for i in $(seq 1 15); do
|
||||
if python3 -c "import sys, torch; sys.exit(0 if torch.cuda.is_available() else 1)" 2>/dev/null; then
|
||||
echo "GPU is available."
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
echo "=== OmniVoice Server ==="
|
||||
echo
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Wants=network-online.target
|
||||
[Container]
|
||||
Image=localhost/omnivoice:latest
|
||||
ContainerName=omnivoice
|
||||
Network=internal.network
|
||||
|
||||
# CPU-only container
|
||||
#Memory=8g
|
||||
|
||||
Ссылка в новой задаче
Block a user