| FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| ENV MKL_THREADING_LAYER=GNU |
|
|
| RUN apt-get update && apt-get install -y git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev build-essential cmake aria2 |
|
|
| RUN useradd -m -u 1000 user |
|
|
| USER user |
|
|
| ENV HOME=/home/user \ |
| PATH=/home/user/.local/bin:$PATH \ |
| PYTHONPATH=$HOME/app \ |
| PYTHONUNBUFFERED=1 \ |
| GRADIO_ALLOW_FLAGGING=never \ |
| GRADIO_NUM_PORTS=1 \ |
| GRADIO_SERVER_NAME=0.0.0.0 \ |
| GRADIO_THEME=huggingface \ |
| GRADIO_SHARE=False \ |
| SYSTEM=spaces |
|
|
| |
| WORKDIR $HOME/app |
|
|
| RUN git clone -b magnet https://github.com/camenduru/audiocraft $HOME/app |
| |
| |
| RUN pip install -q av julius omegaconf einops num2words flashy torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121 torchmetrics sentencepiece gradio |
| RUN pip install -q https://github.com/camenduru/wheels/releases/download/colab/xformers-0.0.20+1dc3d7a.d20240115-cp310-cp310-linux_x86_64.whl |
| RUN pip install -q . |
|
|
| |
|
|
| |
| ENV CUDA_DEVICE_ORDER=PCI_BUS_ID |
| ENV CUDA_VISIBLE_DEVICES=0 |
|
|
| |
| CMD ["python", "-m", "demos.magnet_app", "--share"] |