Replace resemble-perth with a no-op stub
All checks were successful
Build ROCm Image / build (push) Successful in 17m32s
All checks were successful
Build ROCm Image / build (push) Successful in 17m32s
resemble-perth uses uv-build which is incompatible with the old system pip in the ROCm base image. Since watermarking is unnecessary for self-hosted private use, stub out the perth module so chatterbox's import is satisfied without any build complexity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY perth_stub.py .
|
||||
|
||||
# Step 1: Install ROCm-compatible PyTorch stack first.
|
||||
# This must happen before anything else to prevent pip from pulling CPU wheels.
|
||||
COPY requirements-rocm-init.txt .
|
||||
@@ -26,15 +28,14 @@ RUN pip3 install -r requirements-rocm-init.txt
|
||||
COPY requirements-rocm.txt .
|
||||
RUN pip3 install -r requirements-rocm.txt
|
||||
|
||||
# Step 3: Install resemble-perth with --no-build-isolation so pip uses the
|
||||
# already-installed uv binary instead of an isolated env where it can't find it.
|
||||
RUN pip3 install uv && \
|
||||
pip3 install --no-build-isolation \
|
||||
"resemble-perth @ git+https://github.com/resemble-ai/Perth.git@master"
|
||||
|
||||
# Step 3: Install chatterbox with --no-deps so pip cannot replace ROCm torch.
|
||||
RUN pip3 install --no-deps chatterbox-tts
|
||||
|
||||
# Stub out resemble-perth (audio watermarking, unnecessary for self-hosted use).
|
||||
# Install as 'perth' module to satisfy chatterbox's import.
|
||||
RUN python3 -c "import site; print(site.getsitepackages()[0])" | \
|
||||
xargs -I{} cp /app/perth_stub.py {}/perth.py
|
||||
|
||||
# Application source
|
||||
COPY engine.py config.py wyoming_handler.py wyoming_voices.py main.py ./
|
||||
|
||||
|
||||
11
perth_stub.py
Normal file
11
perth_stub.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Stub for resemble-perth audio watermarking.
|
||||
# Watermarking is unnecessary for self-hosted/private deployments.
|
||||
# This stub satisfies chatterbox's import without the build complexity.
|
||||
|
||||
class PerthImplicitWatermarker:
|
||||
def apply_watermark(self, audio, sample_rate):
|
||||
return audio
|
||||
|
||||
class PerthImperceptibleWatermarker:
|
||||
def apply_watermark(self, audio, sample_rate):
|
||||
return audio
|
||||
@@ -12,7 +12,7 @@ huggingface-hub
|
||||
omegaconf
|
||||
|
||||
# Chatterbox dependencies (installed separately since chatterbox uses --no-deps)
|
||||
# Note: resemble-perth is installed in a separate Dockerfile step with --no-build-isolation
|
||||
# Note: resemble-perth is stubbed out in perth_stub.py (watermarking unneeded for self-hosted use)
|
||||
conformer==0.3.2
|
||||
s3tokenizer
|
||||
spacy-pkuseg
|
||||
|
||||
Reference in New Issue
Block a user