fix: T4/ZeroGPU compat — cuDNN pin, font packages, GPU detection

#2
Build Small Hackathon org
No description provided.
Build Small Hackathon org

What this PR fixes

This branch was validated on a working T4 GPU Space: https://huggingface.co/spaces/Blazestorm001/aMuseMe-v1

Changes

  • app.py — Added SPACES_ZERO_GPU env-var detection so spaces.GPU is only applied on actual ZeroGPU Spaces. On a permanent GPU (T4 etc.) inference runs directly without trying to allocate a ZeroGPU session (which raises RuntimeError on non-ZeroGPU hardware). ZeroGPU duration also bumped to 150 s.
  • requirements.txt — Removed ctranslate2==4.3.1 pin. That wheel was compiled against cuDNN 8 and fails with libcudnn_ops_infer.so.8: cannot open shared object file on ZeroGPU (cuDNN 9). Letting pip resolve the wheel automatically fixes this.
  • packages.txt (new file) — Adds fonts-dejavu-core and fonts-liberation so the Pillow renderer can locate TTF fonts inside the Space container. Without this the video renders with a fallback bitmap font.
  • src/amuseme/transcriber.py — Whisper model loader now checks torch.cuda.is_available() upfront instead of defaulting to CUDA and catching the cuDNN error at runtime.

After merging

This Space will run correctly on T4 (or any permanent GPU) without dependency issues — no ZeroGPU required. Set the Space hardware to T4 small/medium and it works out of the box.

Reference working Space (T4): https://huggingface.co/spaces/Blazestorm001/aMuseMe-v1

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment