You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Docker Hub镜像构建深度学习容器执行bash命令报错求助

解决Docker运行continuumio镜像时/bin/bash无法执行的问题
  • 问题根源:你使用的continuumio/conda-ci-linux-64-python3.7镜像是基于x86_64架构构建的,若本地机器为ARM架构(比如Apple Silicon系列Mac),Docker默认直接运行x86镜像会出现二进制兼容问题,导致无法执行bash。

  • 解决方案1:指定架构运行
    添加--platform linux/amd64参数强制Docker以x86_64架构运行镜像,修改后的命令为:

    docker run -it --platform linux/amd64 --name test_conda continuumio/conda-ci-linux-64-python3.7:latest bash
    
  • 解决方案2:更换适配本地架构的镜像
    若为ARM架构机器,可使用支持多架构的conda镜像(如condaforge/miniforge3),示例命令:

    docker run -it --name test_conda condaforge/miniforge3:latest bash
    

    进入容器后可自行搭建Python 3.7环境:

    conda create -n py37 python=3.7
    conda activate py37
    
  • 验证方法:先查看本地Docker架构:

    docker info | grep Architecture
    

    再查看镜像支持的架构:

    docker inspect continuumio/conda-ci-linux-64-python3.7:latest | grep -i architecture
    

    两者不一致则会触发该错误。

内容的提问来源于stack exchange,提问作者nothing

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 07:08:20