Spaces:
Configuration error
Configuration error
| FROM tensorflow/tensorflow:latest-gpu | |
| WORKDIR /home/gradio_demos | |
| # resolve error related to opencv (ImportError: libGL.so.1: cannot open shared object file: No such file or directory) | |
| RUN apt update | |
| RUN apt -y upgrade | |
| RUN apt install -y libgl1-mesa-glx | |
| # install pip | |
| # RUN apt install python3-pip | |
| # install tensorflow | |
| RUN pip3 install tensorflow | |
| # install gradio module | |
| RUN pip3 install gradio | |
| # install module related to neural style transfer function | |
| RUN pip3 install tensorflow_hub | |
| # install module related to background removal function | |
| RUN pip3 install rembg | |
| # install module related to object removal function | |
| RUN pip3 install simple_lama_inpainting | |
| # install module related to in-painting function | |
| COPY PowerPaint ./PowerPaint | |
| RUN pip3 install -r PowerPaint/requirements/requirements.txt | |
| RUN apt install -y git-lfs | |
| RUN git lfs install | |
| RUN git lfs clone https://huggingface.co/JunhaoZhuang/PowerPaint-v1/ ./checkpoints/ppt-v1 | |
| # install module related to upscaling function | |
| RUN git clone https://github.com/xinntao/Real-ESRGAN.git | |
| RUN pip3 install basicsr | |
| RUN sed -i 's/torchvision.transforms.functional_tensor/torchvision.transforms.functional/g' /usr/local/lib/python3.11/dist-packages/basicsr/data/degradations.py | |
| RUN pip3 install facexlib | |
| RUN pip3 install gfpgan | |
| RUN pip3 install -r Real-ESRGAN/requirements.txt | |
| WORKDIR /home/gradio_demos/Real-ESRGAN | |
| RUN python3 setup.py develop | |
| WORKDIR /home/gradio_demos | |
| # upgrade gradio to support newest components | |
| RUN pip3 install --upgrade gradio | |
| # copy dependency files and scripts | |
| COPY images ./images | |
| COPY images2 ./images2 | |
| COPY images3 ./images3 | |
| COPY images4 ./images4 | |
| COPY style_images ./style_images | |
| COPY gradio_dynamic.py . | |
| # run main script | |
| CMD ["python3", "gradio_dynamic.py"] | |