0

我试图用 M1 芯片在我的 MacBookPro 上构建一个现有的 dockerfile,但是在安装 anaconda3 时出现以下错误。为什么会输出这样的错误?另外,我该如何解决这个问题?在docker-compose中,平台设置为linux/arm64,cpus为2,但输出同样的错误。

PREFIX=/opt/anaconda3
Unpacking payload ...
/lib64/ld-linux-x86-64.so.2: No such file or directory
/lib64/ld-linux-x86-64.so.2: No such file or directory

我的 Dockerfile 在下面。

FROM ubuntu:latest

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

#install anaconda3
WORKDIR /opt
#download anaconda package and install anaconda
# archive => https://repo.continuum.io/archive/

RUN wget https://repo.continuum.io/archive/Anaconda3-2020.07-Linux-x86_64.sh && \
          
                sh /opt/Anaconda3-2020.07-Linux-x86_64.sh -b -p /opt/anaconda3 && \
           
                rm -f Anaconda3-2020.07-Linux-x86_64.sh


ENV PATH /opt/anaconda3/bin:$PATH

#update pip and conda
RUN pip install -U pip

WORKDIR /code
ADD requirements.txt /code
RUN pip install -r requirements.txt
WORKDIR /
#execute jupyter lab as a default command
CMD ["jupyter","lab","--ip=0.0.0.0","--allow-root","--LabApp.token=''"]

我的 docker-compose.yml 文件如下

version: "3"
services:
  jupyter:
    image: investment-project:1.0.0
    container_name: investment-jupyter
    build: .
    platform: linux/arm64/v8
    cpus: "2"
    volumes:
        - $PWD:/tmp/working
    working_dir: /tmp/working
    ports:
     - 8888:8888
    command: jupyter notebook --ip=0.0.0.0 --allow-root --LabApp.token=''
4

0 回答 0