voice-detection-api / Dockerfile
Hariharan S
Initial deployment
6822466
raw
history blame contribute delete
678 Bytes
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies for audio processing
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Ensure model weights directory exists
RUN mkdir -p ml/saved_models
# Hugging Face Spaces uses port 7860
ENV PORT=7860
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]