Nvidia/cuda-runntime docker镜像中的micromamba安装不起作用

rqmkfv5c  于 2023-04-20  发布在  Docker
关注(0)|答案(1)|浏览(226)

由于conda的新许可政策,我们必须使用mamba作为替代。我正在迁移我的docker文件,但在正确安装micromamba时遇到了问题。基本docker如下

ARG CUDA=11.1.1
FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04
ARG CUDA

然后我通过apt-get安装所有curl等。

RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
RUN export MAMBA_ROOT_PREFIX=./micromamba  # optional, defaults to ~/micromamba
RUN eval "$(./bin/micromamba shell hook -s posix)"
RUN micromamba activate

在构建过程中,我得到以下错误:

RUN micromamba activate
 ---> Running in ccee400f407d

'micromamba' is running as a subprocess and can't modify the parent shell.
Thus you must initialize your shell before using activate and deactivate.

    To initialize the current  shell, run:
        $ eval "$(micromamba shell hook --shell=)"
    and then activate or deactivate with:
        $ micromamba activate
    
To automatically initialize all future () shells, run:
    $ micromamba shell init --shell= --prefix=~/micromamba

Supported shells are {bash, zsh, csh, xonsh, cmd.exe, powershell, fish}.

有什么建议吗

qoefvg9y

qoefvg9y1#

考虑使用来自mambaorg/micromamba的镜像。这些镜像都安装了micromamba和一些帮助脚本,可以更轻松地在不同的上下文中激活您的环境。标记中包含cuda的镜像来自nvidia/cuda镜像。
如果你想要一个Ubuntu 18.04镜像,请尝试:

mambaorg/micromamba:bionic-cuda-11.6.2

或者如果你想要更前沿的东西,试试:

mambaorg/micromamba:jammy-cuda-12.1.0

文档可以在corresponding GitHub repo上找到。
充分披露,我是mambaorg/micromamba图像系列的主要维护者。

相关问题