YTShortMakerArchx's picture
Create Dockerfile
1383128 verified
Raw History Blame Contribute Delete
752 Bytes
# ============================================================
# Qwen3-ForcedAligner-0.6B — HuggingFace Docker Space
# ============================================================
FROM python:3.11-slim
# HF Spaces run as user 1000
RUN useradd -m -u 1000 user
WORKDIR /app
# System deps for soundfile / librosa
RUN apt-get update && apt-get install -y --no-install-recommends \
libsndfile1 \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy & install Python deps first (layer cache)
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source
COPY --chown=user . .
USER user
# HF Spaces expose port 7860
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]