我想在我的 Gitlab CI-CD 进程中激活 conda 环境。我在与我的工作笔记本电脑不同的本地计算机(UNIX)上使用 Shell Executor 注册了 Gitlab 运行程序(v13.10) 我试图通过我的存储库中存在的环境 yml 文件激活 conda 环境,但它失败并显示 conda 命令未找到!
我编辑了 .gitlab-ci.yml 文件,如下所示:
stages:
- build
build stage:
stage: build
before_script:
- which python
- export PIP_CACHE_DIR="/opt/cache/pip"
- conda env create -f environment.yml
- source activate env_work
script:
- echo "Building"
- cd parent_dir
- python main.py new_studies/first_study
artifacts:
paths:
- out/
only:
- master
Run Code Online (Sandbox Code Playgroud)
我面临的问题是它抛出一个错误:CONDA Command NOT FOUND
Running with gitlab-runner 13.10.0 (5421146)
on rig ci runner gZzdceA
Preparing the …Run Code Online (Sandbox Code Playgroud)