Some checks failed
Build ROCm Image / build (push) Failing after 11s
ROCm 7.2 + PyTorch 2.11.0 has a bug where PyTorch passes workspace=0 to MIOpen convolutions, forcing fallback to the slow GemmFwdRest solver. This caused s3gen.inference to take 15-22s instead of <5s, making synthesis 3-4x slower than real-time audio playback. ROCm 6.1 allocates workspace correctly so MIOpen picks fast GEMM solvers without needing torch.compile workarounds. Changes: - Base image: rocm/dev-ubuntu-22.04:7.2 → 6.1 - torch 2.11.0 → 2.5.1 (rocm6.1 wheel index) - Add pytorch_triton_rocm==3.1.0 - transformers 5.2.0 → 4.46.3, safetensors 0.5.3 → 0.4.0 - s3tokenizer unpinned → 0.3.0 - resemble-perth==1.0.1 directly (v1.0.1 is pip-installable; drop stub) - Drop Dockerfile perth_stub steps - Drop torch.compile and timing patches from engine.py (not needed) - Drop multi-pass warmup from main.py (torch JIT warmup not needed) - Drop ROCm 7.2-specific env vars from docker-compose.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1.1 KiB
Docker
44 lines
1.1 KiB
Docker
FROM rocm/dev-ubuntu-22.04:6.1
|
|
|
|
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 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"]
|