Files
glados-ladosp-tts/entrypoint.sh
xerotacovix 4ddf29aeb7
All checks were successful
Build and Publish Docker Images / build-cuda (push) Successful in 6m12s
Build and Publish Docker Images / build-rocm (push) Successful in 6m33s
Build and Publish Docker Images / build-cpu (push) Successful in 18m51s
fixed a lot of things and actually got it to work
2026-06-13 09:56:48 +00:00

48 lines
1.0 KiB
Bash

#!/bin/bash
set -e
MODEL_DIR="${MODEL_DIR:-/data}"
echo "Checking model directory: $MODEL_DIR"
if [ -z "$(ls -A "$MODEL_DIR" 2>/dev/null)" ]; then
echo "Model directory is empty. Downloading GLaDOS model..."
python /app/download_model.py --output-dir "$MODEL_DIR"
else
echo "Model files found in $MODEL_DIR"
ls -la "$MODEL_DIR"
fi
# Ensure NLTK data is available
python -c "
import nltk
try:
nltk.data.find('taggers/averaged_perceptron_tagger_eng')
except LookupError:
nltk.download('averaged_perceptron_tagger_eng')
try:
nltk.data.find('corpora/cmudict')
except LookupError:
nltk.download('cmudict')
"
HALF="${HALF:-false}"
PRELOAD="${PRELOAD:-false}"
HALF_FLAG=""
if [ "$HALF" = "true" ]; then
HALF_FLAG="--half"
fi
PRELOAD_FLAG=""
if [ "$PRELOAD" = "true" ]; then
PRELOAD_FLAG="--preload"
fi
echo "Starting Wyoming GLaDOS TTS server..."
exec python -m wyoming_glados \
--model-dir "$MODEL_DIR" \
--uri "${URI:-tcp://0.0.0.0:10200}" \
--device "${DEVICE:-cpu}" \
$HALF_FLAG \
$PRELOAD_FLAG