Spaces:
Sleeping
Sleeping
| # Use Python 3.11 as the base image | |
| FROM docker.io/library/python:3.11@sha256:6e9f67fa63b0323fc96f8a991bd7c6382f05031c24a7e9601777c513c6cdec3f | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| git-lfs \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| cmake \ | |
| rsync \ | |
| libgl1-mesa-glx \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /home/user/app | |
| # Create and set user | |
| RUN useradd -m -u 1000 user && chown 1000:1000 /home/user/app | |
| # Install Node.js (optional, remove if not needed) | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ | |
| apt-get install -y nodejs && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY --chown=1000:1000 requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Copy application code | |
| COPY --chown=1000:1000 . . | |
| # Command to run the app | |
| CMD ["python", "app.py"] |