fix: Docker compatibility issues with Gradio and ElevenLabs API#167
Open
CalebMorse06 wants to merge 1 commit intoRayVentura:stablefrom
Open
fix: Docker compatibility issues with Gradio and ElevenLabs API#167CalebMorse06 wants to merge 1 commit intoRayVentura:stablefrom
CalebMorse06 wants to merge 1 commit intoRayVentura:stablefrom
Conversation
- Pin huggingface_hub<1.0.0 to fix HfFolder import error with Gradio 4.x - Downgrade Gradio 5.12.0 to 4.19.0 to fix localhost accessibility check in Docker - Add error handling to ElevenLabsAPI.get_voices() to prevent crash on invalid API key - Add inline documentation explaining version constraints Fixes Docker startup failures: - ValueError: When localhost is not accessible... - ImportError: cannot import name 'HfFolder' - KeyError: 'voices'
|
@CalebMorse06 is attempting to deploy a commit to the rayventura's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The current status of the branch is not buildable. Here's the error I get: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR fixes three critical issues that prevent ShortGPT from starting in Docker containers:
🐛 Issue 1: Gradio 5.x Localhost Check Fails
Error: ValueError: When localhost is not accessible, a shareable link must be created Cause: Gradio 5.12.0 performs a localhost accessibility check that fails inside Docker containers. Fix: Downgraded to Gradio 4.19.0 which doesn't have this check.
🐛 Issue 2: HuggingFace Hub Import Error
Error: ImportError: cannot import name 'HfFolder' from 'huggingface_hub' Cause: huggingface_hub 1.0+ removed the HfFolder class that Gradio 4.x imports. Fix: Pinned huggingface_hub<1.0.0.
🐛 Issue 3: ElevenLabs API Crash
Error: KeyError: 'voices' Cause: Code crashes when ElevenLabs API key is invalid/missing. Fix: Added try/except error handling - app now gracefully continues with Edge TTS.
Tested on:
Windows 11 with Docker Desktop
python:3.10-slim-bullseye image
✅ UI loads at http://localhost:31415/
✅ All tabs functional
Types of changes
Bugfix (non-breaking change which fixes an issue) 🐛