Files
rocm-chatterbox-whisper/Dockerfile.rocm
scott d7247d31fe
Some checks failed
Build ROCm Image / build (push) Failing after 5m28s
Install resemble-perth with --no-build-isolation
pip's isolated build environments don't have the uv binary available,
causing uv-build to fail. Installing with --no-build-isolation lets pip
use the already-installed uv from the system environment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 10:58:21 -04:00

50 lines
1.4 KiB
Docker

FROM rocm/dev-ubuntu-22.04:latest
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
HF_HOME=/app/hf_cache \
PIP_NO_CACHE_DIR=1
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
git \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# 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 .
RUN pip3 install -r requirements-rocm-init.txt
# Step 2: Install remaining dependencies (pinned to avoid overwriting torch).
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
# Application source
COPY engine.py config.py wyoming_handler.py wyoming_voices.py main.py ./
# Default config (can be overridden by volume mount)
COPY config.yaml .
# Create default directories
RUN mkdir -p voices reference_audio hf_cache
EXPOSE 10200
CMD ["python3", "main.py"]