Spaces:
Runtime error
Runtime error
File size: 599 Bytes
e7d8eb3 fbd661f e7d8eb3 e902cfd 11ff280 0d7e2af e7d8eb3 |
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 |
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
# Install numpy first to avoid conflicts
RUN pip install --no-cache-dir "numpy<2" && \
pip install --no-cache-dir -r requirements.txt
RUN useradd -m appuser && \
mkdir -p /app/.cache/huggingface && \
chown -R appuser:appuser /app
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface \
HF_DATASETS_CACHE=/app/.cache/huggingface
USER appuser
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |