Create Dockerfile
Browse files- Dockerfile +32 -0
Dockerfile
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04
|
2 |
+
WORKDIR /content
|
3 |
+
ENV PATH="/home/camenduru/.local/bin:${PATH}"
|
4 |
+
|
5 |
+
RUN adduser --disabled-password --gecos '' camenduru && \
|
6 |
+
adduser camenduru sudo && \
|
7 |
+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
8 |
+
chown -R camenduru:camenduru /content && \
|
9 |
+
chmod -R 777 /content && \
|
10 |
+
chown -R camenduru:camenduru /home && \
|
11 |
+
chmod -R 777 /home && \
|
12 |
+
apt update -y && add-apt-repository -y ppa:git-core/ppa && apt update -y && apt install -y aria2 git git-lfs unzip ffmpeg
|
13 |
+
|
14 |
+
USER camenduru
|
15 |
+
|
16 |
+
RUN pip install -q opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod \
|
17 |
+
einops==0.7.0 pytorch-lightning==2.2.1 omegaconf==2.3.0 lpips==0.1.4 ftfy==6.2.0 regex==2023.12.25 timm==0.9.16 facexlib==0.3.0 accelerate==0.28.0 && \
|
18 |
+
git clone -b dev https://github.com/camenduru/DiffBIR /content/DiffBIR && \
|
19 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/face_full_v1.ckpt -d /content/DiffBIR/weights -o face_full_v1.ckpt && \
|
20 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/general_full_v1.ckpt -d /content/DiffBIR/weights -o general_full_v1.ckpt && \
|
21 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/face_swinir_v1.ckpt -d /content/DiffBIR/weights -o face_swinir_v1.ckpt && \
|
22 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/general_swinir_v1.ckpt -d /content/DiffBIR/weights -o general_swinir_v1.ckpt && \
|
23 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/BSRNet.pth -d /content/DiffBIR/weights -o BSRNet.pth && \
|
24 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR/resolve/main/scunet_color_real_psnr.pth -d /content/DiffBIR/weights -o scunet_color_real_psnr.pth && \
|
25 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR-v2/resolve/main/v1_face.pth -d /content/DiffBIR/weights -o v1_face.pth && \
|
26 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR-v2/resolve/main/v1_general.pth -d /content/DiffBIR/weights -o v1_general.pth && \
|
27 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/DiffBIR-v2/resolve/main/v2.pth -d /content/DiffBIR/weights -o v2.pth && \
|
28 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt -d /content/DiffBIR/weights -o v2-1_512-ema-pruned.ckpt
|
29 |
+
|
30 |
+
COPY ./worker_runpod.py /content/DiffBIR/worker_runpod.py
|
31 |
+
WORKDIR /content/DiffBIR
|
32 |
+
CMD python worker_runpod.py
|