不能到安装mkl mkl服务使用conda在docker

mi7gmzs6  于 2023-02-11  发布在  Docker
关注(0)|答案(1)|浏览(229)

我有如下Docker文件:

FROM continuumio/miniconda3

RUN conda update -n base -c defaults conda
RUN conda create -c conda-forge -n pymc3_env pymc3 numpy theano-pymc mkl mkl-service

COPY ./src /app

WORKDIR /app

CMD ["conda", "run", "-n", "pymc3_env", "python", "ma.py"]

出现以下错误:

------                                                                                                                                          
 > [3/5] RUN conda create -c conda-forge -n pymc3_env pymc3 numpy theano-pymc mkl mkl-service:                                                  
#0 0.400 Collecting package metadata (current_repodata.json): ...working... done                                                                
#0 9.148 Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.              
#0 9.149 Collecting package metadata (repodata.json): ...working... done                                                                        
#0 45.81 Solving environment: ...working... failed                                                                                              
#0 45.82 
#0 45.82 PackagesNotFoundError: The following packages are not available from current channels:
#0 45.82 
#0 45.82   - mkl-service
#0 45.82   - mkl
#0 45.82 
#0 45.82 Current channels:
#0 45.82 
#0 45.82   - https://conda.anaconda.org/conda-forge/linux-aarch64
#0 45.82   - https://conda.anaconda.org/conda-forge/noarch
#0 45.82   - https://repo.anaconda.com/pkgs/main/linux-aarch64
#0 45.82   - https://repo.anaconda.com/pkgs/main/noarch
#0 45.82   - https://repo.anaconda.com/pkgs/r/linux-aarch64
#0 45.82   - https://repo.anaconda.com/pkgs/r/noarch
#0 45.82 
#0 45.82 To search for alternate channels that may provide the conda package you're
#0 45.82 looking for, navigate to
#0 45.82 
#0 45.82     https://anaconda.org
#0 45.82 
#0 45.82 and use the search bar at the top of the page.
#0 45.82 
#0 45.82 
------
failed to solve: executor failed running [/bin/sh -c conda create -c conda-forge -n pymc3_env pymc3 numpy theano-pymc mkl mkl-service]: exit code: 1

有人能帮我理解为什么conda在conda-forge通道中找不到mklmkl-service,我需要什么来解决这个问题?
我使用macos作为主机,如果它是任何关注。
提前感谢您的帮助。

dbf7pr2w

dbf7pr2w1#

MKL仅适用于x86_64,即Docker映像必须使用linux/amd64平台。因此,请在build命令行或FROM中指定--platform=linux/amd64

相关问题