Spaces:
Sleeping
Sleeping
File size: 723 Bytes
3a47a7e 0703532 3a47a7e a82d5b4 0703532 3a47a7e 0703532 a82d5b4 0703532 a82d5b4 3a47a7e 0703532 a82d5b4 0703532 a0bb23f 3a47a7e 0703532 a82d5b4 3a47a7e 0703532 3a47a7e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | FROM python:3.10-slim
# Install system dependencies for audio and phonemization
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
espeak-ng \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Set up a non-root user (Hugging Face Requirement)
RUN useradd -m -u 1000 user
WORKDIR /app
# Switch to user context
USER user
ENV PATH="/home/user/.local/bin:${PATH}"
# Install Python requirements
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
RUN pip install 'markitdown[all]'
# Copy your application code
COPY --chown=user . .
# Expose port 7860 for HF Spaces
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |