FROM ghcr.io/pytorch/pytorch-nightly@sha256:ebd8572c2645e756d49bc2e4ef1d19d47b29b97a083662d4da83e9744a1a0c04

RUN apt-get update
RUN apt-get install -y git gcc build-essential libsndfile1-dev sox curl zip libsox-fmt-mp3

RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && aws/install

RUN pip install jupyterlab gradio

WORKDIR /suno

COPY glockenspiel/suno_utils /suno/code/suno_utils

RUN pip install -e /suno/code/suno_utils

COPY glockenspiel/suno_api /suno/code/suno_api

RUN pip install --no-cache-dir -r  /suno/code/suno_api/requirements.txt

WORKDIR /suno/code/suno_api

CMD ["python", "suno_api/internal/generative_worker.py"]