Aswinthmani's picture
Update Dockerfile
11ff280 verified
raw
history blame
599 Bytes
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"]