Spaces:
Running on Zero
Running on Zero
fix: T4/ZeroGPU compat — cuDNN pin, font packages, GPU detection
#2
by Blazestorm001 - opened
No description provided.
What this PR fixes
This branch was validated on a working T4 GPU Space: https://huggingface.co/spaces/Blazestorm001/aMuseMe-v1
Changes
app.py— AddedSPACES_ZERO_GPUenv-var detection sospaces.GPUis only applied on actual ZeroGPU Spaces. On a permanent GPU (T4 etc.) inference runs directly without trying to allocate a ZeroGPU session (which raisesRuntimeErroron non-ZeroGPU hardware). ZeroGPU duration also bumped to 150 s.requirements.txt— Removedctranslate2==4.3.1pin. That wheel was compiled against cuDNN 8 and fails withlibcudnn_ops_infer.so.8: cannot open shared object fileon ZeroGPU (cuDNN 9). Letting pip resolve the wheel automatically fixes this.packages.txt(new file) — Addsfonts-dejavu-coreandfonts-liberationso 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 checkstorch.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