Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +38 -0
Dockerfile
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
WORKDIR /content
|
4 |
+
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
ENV PYTHONUNBUFFERED=True
|
7 |
+
ENV PATH="/home/camenduru/.local/bin:/usr/local/cuda/bin:${PATH}"
|
8 |
+
|
9 |
+
RUN apt update -y && apt install -y software-properties-common build-essential \
|
10 |
+
libgl1 libglib2.0-0 zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev && \
|
11 |
+
add-apt-repository -y ppa:git-core/ppa && apt update -y && \
|
12 |
+
apt install -y python-is-python3 python3-pip sudo nano aria2 curl wget git git-lfs unzip unrar ffmpeg && \
|
13 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run -d /content -o cuda_12.6.2_560.35.03_linux.run && sh cuda_12.6.2_560.35.03_linux.run --silent --toolkit && \
|
14 |
+
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf && ldconfig && \
|
15 |
+
git clone https://github.com/aristocratos/btop /content/btop && cd /content/btop && make && make install && \
|
16 |
+
adduser --disabled-password --gecos '' camenduru && \
|
17 |
+
adduser camenduru sudo && \
|
18 |
+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
19 |
+
chown -R camenduru:camenduru /content && \
|
20 |
+
chmod -R 777 /content && \
|
21 |
+
chown -R camenduru:camenduru /home && \
|
22 |
+
chmod -R 777 /home
|
23 |
+
|
24 |
+
USER camenduru
|
25 |
+
|
26 |
+
RUN pip install torch==2.5.1+cu124 torchvision==0.20.1+cu124 torchaudio==2.5.1+cu124 torchtext==0.18.0 torchdata==0.8.0 --extra-index-url https://download.pytorch.org/whl/cu124 && \
|
27 |
+
pip install xformers==0.0.28.post3 && \
|
28 |
+
pip install opencv-contrib-python imageio imageio-ffmpeg ffmpeg-python av runpod && \
|
29 |
+
git clone -b dev https://github.com/camenduru/MMAudio /content/MMAudio && cd /content/MMAudio && pip install -e . && \
|
30 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/nvidia/bigvgan_v2_44khz_128band_512x/resolve/main/bigvgan_generator.pt -d /content/MMAudio/weights/bigvgan_v2_44khz_128band_512x -o bigvgan_generator.pt && \
|
31 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/nvidia/bigvgan_v2_44khz_128band_512x/raw/main/config.json -d /content/MMAudio/weights/bigvgan_v2_44khz_128band_512x -o config.json && \
|
32 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/hkchengrex/MMAudio/resolve/main/weights/mmaudio_large_44k_v2.pth -d /content/MMAudio/weights -o mmaudio_large_44k_v2.pth && \
|
33 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/hkchengrex/MMAudio/releases/download/v0.1/synchformer_state_dict.pth -d /content/MMAudio/ext_weights -o synchformer_state_dict.pth && \
|
34 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/hkchengrex/MMAudio/releases/download/v0.1/v1-44.pth -d /content/MMAudio/ext_weights -o v1-44.pth
|
35 |
+
|
36 |
+
COPY ./worker_runpod.py /content/MMAudio/worker_runpod.py
|
37 |
+
WORKDIR /content/MMAudio
|
38 |
+
CMD python worker_runpod.py
|