whisperx-api-cpu / Dockerfile
sdafd's picture
Create Dockerfile
cdc04ae verified
raw
history blame contribute delete
660 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Install system dependencies (ffmpeg is needed for audio processing)
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy requirements file and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose port 8000 for the API
EXPOSE 8000
# Command to run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]