我有如下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
通道中找不到mkl
和mkl-service
,我需要什么来解决这个问题?
我使用macos作为主机,如果它是任何关注。
提前感谢您的帮助。
1条答案
按热度按时间dbf7pr2w1#
MKL仅适用于
x86_64
,即Docker映像必须使用linux/amd64
平台。因此,请在build
命令行或FROM
中指定--platform=linux/amd64
。