| # Use an official Python runtime as a parent image | |
| FROM python:3.10 | |
| # Set the working directory to /home/user/app | |
| WORKDIR /home/user/app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| git-lfs \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| cmake \ | |
| rsync \ | |
| libgl1-mesa-glx \ | |
| curl \ | |
| nodejs \ | |
| sqlite3 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the current directory contents into the container at /home/user/app | |
| COPY --chown=1000:1000 . /home/user/app | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir pip -U && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Make port 7860 available to the world outside this container | |
| EXPOSE 7860 | |
| # Define environment variable | |
| ENV NAME World | |
| # Run app.py when the container launches | |
| CMD ["python", "app.py"] | |