lyric-sync-api / Dockerfile
Joyboy-dy's picture
Upload 3 files
9d59b4c verified
raw
history blame contribute delete
644 Bytes
FROM python:3.11
WORKDIR /app
# Install system dependencies (ffmpeg is required for audio processing)
RUN apt-get update && apt-get install -y ffmpeg
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create a user to avoid running as root (security best practice required by HF)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Expose port 7860 (Hugging Face default port)
EXPOSE 7860
# Start command
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]