问题1:Please answer 'yes' or 'no':'
安装conda必须要回答yes or no
采用这个博主的方法https://blog.csdn.net/leon_wzm/article/details/78260795
不过是把sh改成了bash
RUN bash -c '/bin/echo -e "\nyes\n\nyes" | bash Miniconda3-latest-Linux-x86_64.sh'
不换成bash的话,创建虚拟环境的时候会报错
CondaFileIOError: '/home/developer/miniconda3/pkgs/envs/*/env.txt'. [Errno 2
问题2:conda: not found
需要声明conda路径
RUN export PATH=$PATH:/home/developer/miniconda3/bin && conda create -n sd-webui python=3.10 -y
问题3:/bin/sh: 1: source: not found
把source activate xxx改成
RUN /bin/bash -c "source activate xxx"