Files
whisperx-rocm-api/Dockerfile
SlavaVlad 221ecbe69d Fix PyTorch version compatibility and update ROCm Dockerfile image
- Change torch to stable 2.4.0, add torchvision for compatibility
- Update Dockerfile to use specific ROCm PyTorch image version
2026-05-13 02:15:48 +03:00

36 lines
785 B
Docker

# Use ROCm PyTorch base image with compatible PyTorch
FROM rocm/pytorch:2.4.0-rocm6.0-cxx11-ubuntu22.04
# Set environment variables for ROCm and Python
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
ENV HF_HOME=/app/.cache/huggingface
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -e .
# Expose port
EXPOSE 8000
# Set default environment variables
ENV WHISPERX_MODEL=turbo
ENV WHISPERX_DEVICE=cuda
ENV WHISPERX_COMPUTE_TYPE=float16
# Start the server
CMD ["python", "-m", "whisperx.api.serve"]