`无法在 Anaconda3.sh 中执行脚本 entry_point`

`Failed to execute script entry_point` in Anaconda3.sh

我想在 docker ubuntu 中使用 Anaconda3 来使用 jupyter notbook,但是当我使用 docker build --platform linux/amd64 . 创建图像时,出现以下错误。

我该如何解决?

#8 141.1 
#8 141.1 2022-05-05 04:21:55 (3.62 MB/s) - 'Anaconda3-2019.10-Linux-x86_64.sh' saved [530308481/530308481]
#8 141.1 
#8 141.3 PREFIX=/opt/anaconda3
#8 143.4 Unpacking payload ...
                                                                                          [96] Failed to execute script entry_point concurrent.futures.process._RemoteTraceback: 
#8 151.7 '''
#8 151.7 Traceback (most recent call last):
#8 151.7   File "concurrent/futures/process.py", line 367, in _queue_management_worker
#8 151.7   File "multiprocessing/connection.py", line 251, in recv
#8 151.7 TypeError: __init__() missing 1 required positional argument: 'msg'
#8 151.7 '''
#8 151.7 
#8 151.7 The above exception was the direct cause of the following exception:
#8 151.7 
#8 151.7 Traceback (most recent call last):
#8 151.7   File "entry_point.py", line 71, in <module>
#8 151.7   File "concurrent/futures/process.py", line 483, in _chain_from_iterable_of_lists
#8 151.7   File "concurrent/futures/_base.py", line 598, in result_iterator
#8 151.7   File "concurrent/futures/_base.py", line 435, in result
#8 151.7   File "concurrent/futures/_base.py", line 384, in __get_result
#8 151.7 concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
------ executor failed running [/bin/sh -c wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh && sh /opt/Anaconda3-2019.10-Linux-x86_64.sh -b -p /opt/anaconda3 &&     rm -f Anaconda3-2019.10-Linux-x86_64.sh]: exit code: 1

Docker文件如下:

FROM ubuntu:latest

# update
RUN apt-get -y update && apt-get install -y \
    sudo \
    wget \
    vim

#install anaconda3
WORKDIR /opt
# download anaconda package and install anaconda
# archive -> https://repo.continuum.io/archive/
RUN wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh && \
    sh /opt/Anaconda3-2019.10-Linux-x86_64.sh -b -p /opt/anaconda3 && \
    rm -f Anaconda3-2019.10-Linux-x86_64.sh
# set path
ENV PATH /opt/anaconda3/bin:$PATH

# update pip and conda
RUN pip install --upgrade pip

WORKDIR /
RUN mkdir /work

# execute jupyterlab as a default command
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--LabApp.token=''"]

Mac 12.3.1 苹果 M1

Docker Mac 4.7.1

桌面

这可能是安装过程中的一个 space 问题,我收到了确切的错误。如果您接受在“默认路径”上安装 Anaconda 的默认选项,Anaconda 将安装在您的用户主目录中,其中 space 可能是一个问题。对我来说,在安装过程中将默认目录更改为其他目录后问题得到解决。您也可以参考此页面了解类似问题 - https://github.com/conda/conda/issues/10143