由于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}.
有什么建议吗
1条答案
按热度按时间qoefvg9y1#
考虑使用来自
mambaorg/micromamba
的镜像。这些镜像都安装了micromamba
和一些帮助脚本,可以更轻松地在不同的上下文中激活您的环境。标记中包含cuda
的镜像来自nvidia/cuda
镜像。如果你想要一个Ubuntu 18.04镜像,请尝试:
或者如果你想要更前沿的东西,试试:
文档可以在corresponding GitHub repo上找到。
充分披露,我是
mambaorg/micromamba
图像系列的主要维护者。