Allow Riverst to deploy in either of these modes without code changes:
- CPU / non-GPU deployment
- GPU-capable deployment
After reviewing the repository, no server function strictly requires a GPU to execute. The GPU-sensitive paths are all local-model or local-inference paths where acceleration improves latency or throughput.
-
src/server/bot/utils/device_utils.py:get_best_device -
src/server/bot/processors/audio/resampling_helper.py:AudioResamplingHelper._torchaudio_resample -
src/server/bot/processors/speech/lipsync_processor.py:predict_phonemes_from_waveform -
src/server/bot/processors/speech/lipsync_processor.py:load_cupe_model -
src/server/bot/processors/speech/lipsync_processor.py:LipsyncProcessor.__init__ -
src/server/bot/processors/speech/lipsync_processor.py:LipsyncProcessor._warm_up -
src/server/bot/processors/speech/lipsync_processor.py:LipsyncProcessor._preprocess_audio -
src/server/bot/processors/speech/lipsync_processor.py:LipsyncProcessor._run_lipsync -
src/server/bot/core/component_factory.py:BotComponentFactory._build_stt_service -
src/server/bot/core/component_factory.py:BotComponentFactory._build_tts_service -
src/server/bot/processors/video/processor.py:VideoProcessor.__init__ -
src/server/bot/processors/video/processor.py:VideoProcessor._run_pose_in_background -
src/server/bot/processors/audio/analyzer.py:AudioAnalyzer.analyze_audio
- Add a runtime device policy via
RIVERST_COMPUTE_DEVICE=auto|cpu - Add a Docker build target via
RIVERST_DEPLOYMENT_TARGET=cpu|gpu - Add a GPU compose override for
gpus: all - Keep CPU deployments functional when ONNX export dependencies are unavailable
- Add a small test suite for the runtime device policy
- CPU deployments now default to
requirements.txt - GPU deployments install
requirements.gpu.txt - Runtime device selection is centralized in
bot.utils.device_utils - Pose processing falls back to the PyTorch YOLO model if ONNX export is unavailable