【深度学习】Fooocus-MRE docker镜像 CUDA11.8

https://github.com/MoonRide303/Fooocus-MRE/tree/moonride-main

FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.04
RUN apt-get update && apt-get install -y wget git
RUN wget http://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/conda.sh && \
    bash /tmp/conda.sh -b && rm /tmp/conda.sh
COPY ./deps/ /deps
RUN cp /deps/.condarc /root/
ENV DEBIAN_FRONTEND=noninteractive
# 安装 tzdata 包并设置时区为上海(无交互)
RUN apt-get update && \
    apt-get install -y tzdata && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone
RUN apt-get install -y curl
RUN ~/miniconda3/bin/conda init bash && . ~/.bashrc
RUN . ~/.bashrc && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh |  bash && \
    apt-get install -y git-lfs && git-lfs install
RUN . ~/.bashrc && apt-get install -y python3-pip
RUN . ~/.bashrc && apt-get update && apt-get install -y libopencv-dev --fix-missing
# 打印~/.bashrc
RUN . ~/.bashrc && pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN . ~/.bashrc && git clone https://github.com/MoonRide303/Fooocus-MRE.git
RUN . ~/.bashrc && cd Fooocus-MRE && conda env create -f environment.yaml
RUN . ~/.bashrc && cd Fooocus-MRE && conda activate fooocus && pip install -r requirements_versions.txt


FROM kevinchina/deeplearning:fooocus_base
COPY ./models/ /Fooocus-MRE/models/

在这里插入图片描述

网络有问题,下面是执行办法:

docker run -d --gpus all -p 7861:7861 kevinchina/deeplearning:fooocus1
进入容器手动执行:
git config --global http.proxy http://127.0.0.1:7890 && git config --global http.proxy https://127.0.0.1:7890 && cd /Fooocus-MRE && source /etc/profile.d/clash.sh && proxy_on && conda activate fooocus

nohup python launch.py --listen="0.0.0.0" --port=7861 --share >/app/log1.alg 2>&1 &

猜你喜欢

转载自blog.csdn.net/x1131230123/article/details/133136385