|
|
|
FROM python:3.8 |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
RUN git clone -b dev https://github.com/camenduru/DiffBIR $HOME/app |
|
|
|
|
|
RUN pip install -q einops pytorch_lightning gradio omegaconf xformers==0.0.20 transformers lpips |
|
|
|
|
|
RUN pip install transformers |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y aria2 |
|
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_full_v1.ckpt -d $HOME/app/models -o general_full_v1.ckpt |
|
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_swinir_v1.ckpt -d $HOME/app/models -o general_swinir_v1.ckpt |
|
|
|
|
|
|
|
|
|
|
|
CMD ["python", "gradio_diffbir.py", "--ckpt", "$HOME/app/models/general_full_v1.ckpt", "--config", "$HOME/app/DiffBIR/configs/model/cldm.yaml", "--reload_swinir", "--swinir_ckpt", "$HOME/app/models/general_swinir_v1.ckpt"] |