Spaces:
Running
Running
| # Base image with CUDA 12.1 + cuDNN 8 + Ubuntu 22.04 | |
| FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 | |
| # Avoid interactive prompts during package installation | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3.10 \ | |
| python3.10-venv \ | |
| python3.10-dev \ | |
| python3-pip \ | |
| git \ | |
| git-lfs \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| libgl1-mesa-glx \ | |
| libglib2.0-0 \ | |
| cmake \ | |
| rsync \ | |
| wget \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && git lfs install | |
| # Set python3.10 as the default python & pip | |
| RUN ln -sf /usr/bin/python3.10 /usr/bin/python && \ | |
| ln -sf /usr/bin/pip3 /usr/bin/pip && \ | |
| python -m pip install --no-cache-dir --upgrade pip setuptools wheel | |
| # Set working directory | |
| WORKDIR /app | |
| # Install PyTorch 2.3.0 + cu121 first (this is the version moshi-personaplex expects) | |
| RUN pip install --no-cache-dir \ | |
| torch==2.3.0+cu121 \ | |
| torchaudio==2.3.0+cu121 \ | |
| --index-url https://download.pytorch.org/whl/cu121 | |
| # Copy and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your application code | |
| COPY . . | |
| # Expose the port Gradio / FastAPI will use | |
| EXPOSE 7860 | |
| # Command to run the application | |
| CMD ["python", "app.py"] |