Whisper-api / Dockerfile
NitinBot001's picture
Update Dockerfile
c7c9999 verified
raw
history blame
566 Bytes
# Base image
FROM python:3.10-slim
# Set environment variables to writable paths
ENV HF_HOME=/app/hf_cache
ENV MPLCONFIGDIR=/app/mpl_config
# Install OS packages
RUN apt-get update && \
apt-get install -y git ffmpeg libsndfile1 && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy dependency list and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose API port
EXPOSE 7860
# Run FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]