Spaces:
Running
Running
| FROM python:3.9-slim | |
| # Install system dependencies including FFmpeg, Nginx, and libs for OpenCV & Skia | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| build-essential \ | |
| ffmpeg \ | |
| nginx \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Node.js (18.x) | |
| RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
| && apt-get install -y nodejs | |
| # Set up working directory | |
| WORKDIR /app | |
| # Copy requirement files first for better caching | |
| COPY package.json ./ | |
| COPY requirements.txt ./ | |
| # Install dependencies | |
| RUN npm install | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all the API subfolders and proxy files | |
| COPY . . | |
| # Setup Nginx | |
| COPY nginx.conf /etc/nginx/nginx.conf | |
| # Set permissions for start script | |
| RUN chmod +x start.sh | |
| # Expose the default Hugging Face port | |
| EXPOSE 7860 | |
| # Start all services | |
| CMD ["./start.sh"] | |