Skip to content

fix: Docker compatibility issues with Gradio and ElevenLabs API#167

Open
CalebMorse06 wants to merge 1 commit intoRayVentura:stablefrom
CalebMorse06:fix/docker-compatibility-issues
Open

fix: Docker compatibility issues with Gradio and ElevenLabs API#167
CalebMorse06 wants to merge 1 commit intoRayVentura:stablefrom
CalebMorse06:fix/docker-compatibility-issues

Conversation

@CalebMorse06
Copy link
Copy Markdown

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) 🐛

- 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'
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 20, 2025

@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.

@electricalgorithm
Copy link
Copy Markdown

electricalgorithm commented Mar 22, 2026

The current status of the branch is not buildable. Here's the error I get:

63.48   error: subprocess-exited-with-error
63.48
63.48   × Building wheel for dtw-python (pyproject.toml) did not run successfully.
63.48   │ exit code: 1
63.48   ╰─> [115 lines of output]
63.48       [1/1] Cythonizing dtw/_dtw_utils.pyx
63.48       /tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py:72: _ExperimentalConfiguration: `[tool.distutils]` in `pyproject.toml` is still *experimental* and likely to change in future releases.
63.48         config = read_configuration(filepath, True, ignore_option_errors, dist)
63.48       /tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
63.48       !!
63.48
63.48               ********************************************************************************
63.48               Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
63.48
63.48               By 2027-Feb-18, you need to update your project and remove deprecated calls
63.48               or your builds will no longer be supported.
63.48
63.48               See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
63.48               ********************************************************************************
63.48
63.48       !!
63.48         corresp(dist, value, root_dir)
63.48       /tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
63.48       !!
63.48
63.48               ********************************************************************************
63.48               Please consider removing the following classifiers in favor of a SPDX license expression:
63.48
63.48               License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
63.48
63.48               See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
63.48               ********************************************************************************
63.48
63.48       !!
63.48         dist._finalize_license_expression()
63.48       /tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
63.48       !!
63.48
63.48               ********************************************************************************
63.48               Please consider removing the following classifiers in favor of a SPDX license expression:
63.48
63.48               License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
63.48
63.48               See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
63.48               ********************************************************************************
63.48
63.48       !!
63.48         self._finalize_license_expression()
63.48       running bdist_wheel
63.48       /tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:119: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated
63.48       !!
63.48
63.48               ********************************************************************************
63.48               With Python 2.7 end-of-life, support for building universal wheels
63.48               (i.e., wheels that support both Python 2 and Python 3)
63.48               is being obviated.
63.48               Please discontinue using this option, or if you still need it,
63.48               file an issue with pypa/setuptools describing your use case.
63.48
63.48               This deprecation is overdue, please update your project and remove deprecated
63.48               calls to avoid build errors in the future.
63.48               ********************************************************************************
63.48
63.48       !!
63.48         self.finalize_options()
63.48       running build
63.48       running build_py
63.48       creating build/lib.linux-aarch64-cpython-310/docs
63.48       copying docs/conf.py -> build/lib.linux-aarch64-cpython-310/docs
63.48       creating build/lib.linux-aarch64-cpython-310/maintainer
63.48       copying maintainer/roxypick.py -> build/lib.linux-aarch64-cpython-310/maintainer
63.48       creating build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/_globalCostMatrix.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/dtw.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/mvm.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/countPaths.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/dtw_test_data.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/stepPattern.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/window.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/_backtrack.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/warp.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/__main__.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/dtwPlot.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/__init__.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/warpArea.py -> build/lib.linux-aarch64-cpython-310/dtw
63.48       creating build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_issues.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_cli.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_cran.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_dtw_s.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_countPaths.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_dtw.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/test_doctests.py -> build/lib.linux-aarch64-cpython-310/tests
63.48       running egg_info
63.48       writing dtw_python.egg-info/PKG-INFO
63.48       writing dependency_links to dtw_python.egg-info/dependency_links.txt
63.48       writing entry points to dtw_python.egg-info/entry_points.txt
63.48       writing requirements to dtw_python.egg-info/requires.txt
63.48       writing top-level names to dtw_python.egg-info/top_level.txt
63.48       reading manifest file 'dtw_python.egg-info/SOURCES.txt'
63.48       reading manifest template 'MANIFEST.in'
63.48       warning: no previously-included files matching '__pycache__' found under directory '*'
63.48       warning: no previously-included files matching '*.py[co]' found under directory '*'
63.48       adding license file 'COPYING'
63.48       adding license file 'AUTHORS.rst'
63.48       writing manifest file 'dtw_python.egg-info/SOURCES.txt'
63.48       copying dtw/_dtw_utils.c -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/_dtw_utils.pyx -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/dtw_core.c -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying dtw/dtw_core.h -> build/lib.linux-aarch64-cpython-310/dtw
63.48       copying tests/query.csv -> build/lib.linux-aarch64-cpython-310/tests
63.48       copying tests/reference.csv -> build/lib.linux-aarch64-cpython-310/tests
63.48       creating build/lib.linux-aarch64-cpython-310/dtw/data
63.48       copying dtw/data/aami3a.csv -> build/lib.linux-aarch64-cpython-310/dtw/data
63.48       copying dtw/data/aami3b.csv -> build/lib.linux-aarch64-cpython-310/dtw/data
63.48       running build_ext
63.48       building 'dtw._dtw_utils' extension
63.48       creating build/temp.linux-aarch64-cpython-310/dtw
63.48       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Idtw -I/tmp/pip-build-env-vzu4islc/overlay/lib/python3.10/site-packages/numpy/_core/include -I/usr/local/include/python3.10 -c dtw/_dtw_utils.c -o build/temp.linux-aarch64-cpython-310/dtw/_dtw_utils.o
63.48       error: command 'gcc' failed: No such file or directory
63.48       [end of output]
63.48
63.48   note: This error originates from a subprocess, and is likely not a problem with pip.
63.48   ERROR: Failed building wheel for dtw-python
63.48   Building wheel for openai-whisper (pyproject.toml): started
63.69   Building wheel for openai-whisper (pyproject.toml): finished with status 'done'
63.69   Created wheel for openai-whisper: filename=openai_whisper-20250625-py3-none-any.whl size=803979 sha256=771f0fe6632e656751ffe498435c7dab1ab0a61dfa866835d6dfc7cf6ebd3c7c
63.69   Stored in directory: /root/.cache/pip/wheels/be/22/86/dcf050d50e02b3bb67b5a3b289be2f3376ce7f8717d012d6a8
63.70 Successfully built tinymongo openai-whisper
63.70 Failed to build dtw-python
63.70 ERROR: Could not build wheels for dtw-python, which is required to install pyproject.toml-based projects
63.70```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants