FROM python:3.10-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ git \ ffmpeg \ libsndfile1 \ && rm -rf /var/lib/apt/lists/* # Create and install SongGen with packaging RUN git clone https://github.com/LiuZH-19/SongGen.git && \ cd SongGen && \ echo "from setuptools import setup, find_packages\n\nsetup(\n name='songgen',\n version='0.1',\n packages=find_packages(),\n install_requires=[\n 'torch>=2.4',\n 'soundfile',\n 'numpy'\n ]\n)" > setup.py && \ pip install -e . # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . CMD ["python", "app.py"]