CoolFace
Apppublic

Atharv91/audio_video_module

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1# Use lightweight Python image2FROM python:3.10-slim3 4# Install system dependencies5RUN apt-get update && apt-get install -y \6    ffmpeg \7    build-essential \8    libgl1 \9    && rm -rf /var/lib/apt/lists/*10 11# Create non-root user12RUN useradd -m -u 1000 user13 14# Set environment15ENV HOME=/home/user \16    PATH=/home/user/.local/bin:$PATH17 18# Switch to user19USER user20 21# Set working directory22WORKDIR $HOME/app23 24# Copy requirements first (for caching)25COPY --chown=user requirements.txt .26 27# Install Python dependencies28RUN pip install --no-cache-dir -r requirements.txt29 30# Download only required NLTK data (optimized)31RUN python -c "import nltk; \32nltk.download('punkt'); \33nltk.download('stopwords')"34 35# Copy rest of project36COPY --chown=user . .37 38# Expose Hugging Face port39EXPOSE 786040 41# Run FastAPI42CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]