Files
whisperx-rocm-api/Dockerfile
SlavaVlad c1fcb3f57c Add OpenAI-compatible API and Docker deployment
- Add FastAPI-based API in whisperx/api/
- Implement transcription endpoint compatible with OpenAI
- Added Dockerfile and docker-compose.yml for easy deployment
- Updated README with Docker instructions
- Added new script whisperx-serve for running the API
2026-05-13 01:37:47 +03:00

36 lines
736 B
Docker

# Use ROCm PyTorch base image
FROM rocm/pytorch:latest
# 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"]