# Use an official Python base image | |
FROM python:3.10-slim | |
# Install FFmpeg (required by Whisper) | |
RUN apt-get update && \ | |
apt-get install -y ffmpeg && \ | |
apt-get clean | |
# Set working directory | |
WORKDIR /app | |
# Copy code | |
COPY ./app /app | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Download NLTK tokenizer | |
RUN python -m nltk.downloader punkt | |
# Expose port | |
EXPOSE 8000 | |
# Run the FastAPI app using uvicorn | |
CMD ["uvicorn", "main:app", "--host", "http://127.0.0.1:8000/static/index.html", "--port", "8000"] | |