我可以dev1成功创建虚拟环境,但在 Docker 构建过程中无法激活它并切换到其中。
我想要的只是切换 venv 并将我的依赖项安装在requirements.txt.
我的代码:
WORKDIR /APP
ADD . /APP
ARG CONDA_VENV=dev1
RUN conda create -y --name ${CONDA_VENV} python=3.7
RUN conda activate ${CONDA_VENV}
RUN pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)
错误:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and …Run Code Online (Sandbox Code Playgroud)