CoolFace
Apppublic

ronn12/truth

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile52 linesDownload Raw Back to root
1# Use Python 3.9 slim image as base2FROM python:3.9-slim3 4# Set working directory5WORKDIR /app6 7# Install system dependencies required for OpenCV8RUN apt-get update && apt-get install -y \9    libglib2.0-0 \10    libsm6 \11    libxext6 \12    libxrender-dev \13    && rm -rf /var/lib/apt/lists/*14 15# Set environment variable for Hugging Face cache16ENV TRANSFORMERS_CACHE=/app/cache17 18# Ensure cache and model directories exist and have the right permissions19RUN mkdir -p /app/cache /app/model /app && chmod -R 777 /app/cache /app/model /app20 21# Copy requirements file22COPY requirements.txt .23 24# Install Python dependencies, including gunicorn25RUN pip install --no-cache-dir -r requirements.txt 26 27RUN pip install --no-cache-dir --upgrade pip && \28    pip install --no-cache-dir --default-timeout=100 \29    flask \30    opencv-python \31    mediapipe \32    pandas \33    numpy \34    moviepy \35    librosa \36    joblib \37    gunicorn \ cuda38 39# Copy the application code40COPY . .41 42 43 44# Set environment variable for Flask45ENV PORT 786046 47# Expose port 786048EXPOSE 786049 50# Run the application with uvicorn51CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]52