简体   繁体   English

并行运行 conda-build 是否安全?

[英]Is it safe to run conda-build in parallel?

First question, please yell at me if I'm not following any established norms here:)第一个问题,如果我不遵守这里的任何既定规范,请对我大喊大叫:)

I'm setting up a full conda-build pipeline for the first time and I've got a Makefile that looks something like this:我第一次设置了一个完整的 conda 构建管道,我有一个看起来像这样的 Makefile:

build:
    echo "Building packages."

    conda-build my_first_package/conda-recipe --output-folder /path/to/dev/channel
    conda-build my_second_package/conda-recipe --output-folder /path/to/dev/channel
    conda-build my_third_package/conda-recipe --output-folder /path/to/dev/channel

    conda index /path/to/dev/channel

The three packages in question are pretty tightly connected to each other and are being stored in the same repo so it would be nice to build each one in the same pipeline.有问题的三个包彼此紧密相连,并且存储在同一个 repo 中,因此最好在同一个管道中构建每个包。 What I'd like to do is spin off a separate process for each of those and run each conda-build command in parallel.我想做的是为每个进程分拆一个单独的进程并并行运行每个 conda-build 命令。 Not sure if this is a safe action to take though as I don't really understand what conda-build is doing to "build" the package.不确定这是否是一个安全的操作,因为我真的不明白 conda-build 正在做什么来“构建”package。

I'll be testing this idea later today and will post an update but what I'm really worried about is that it will work with some unintended side effects and I'm not sure how to go about testing for those.我将在今天晚些时候测试这个想法并将发布更新,但我真正担心的是它会产生一些意想不到的副作用,而且我不确定如何测试 go。 So I think my question is: Can conda-build build multiple packages in parallel into the same conda channel?所以我认为我的问题是: conda-build 可以将多个包并行构建到同一个 conda 通道中吗?

Alternatively, for very tightly coupled packages one may want to look into single builds with multiple outputs.或者,对于非常紧密耦合的包,可能需要查看具有多个输出的单个构建。 For reference, see the Outputs Section documentation of conda-build .有关参考,请参阅conda-build 的输出部分文档 It may also be worth checking out a full-blown example, like Conda Forge's matplotlib-feedstock , which builds matplotlib , matplotlib-base , and mpl-sample-data all from a single recipe.还可能值得查看一个完整的示例,例如Conda Forge 的matplotlib-feedstock feedstock ,它从单个配方构建matplotlibmatplotlib-basempl-sample-data

In this particular case, I'd imagine something like在这种特殊情况下,我想像

meta.yaml元.yaml

...
outputs:
  - name: my_first_package
    ...
  - name: my_second_package
    ...
  - name: my_third_package
    ...
...

then run a single conda build command.然后运行一个conda build命令。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 conda-build 和依赖解析 - conda-build and dependency resolution 构建 conda 包:必须使用 conda-build > 2.0 重新构建该包 - Building conda package: The package must be rebuilt with conda-build > 2.0 conda-build 错误地抱怨 meta.yaml 中不包含依赖项 - conda-build complains incorrectly that dependency is not included in meta.yaml 使用 conda-build 进行依赖管理——如何摆脱冗余和重复? - Dependency management with conda-build -- how to get rid of redundancy and duplication? 执行 conda-build 找不到任何文件 - Doing a conda-build does not find any files 当使用 conda-build 构建 conda 包并且我的代码使用纯 python 库时,我需要在 meta.yaml 文件中放入 build/host/run 什么? - When building conda packages using conda-build and my code uses pure python libraries, what do I need to put in build/host/run in the meta.yaml file? conda-build 使用旧的(陈旧的)setup.py - conda-build using an old (stale) setup.py 为什么在 conda-build 的构建过程中将 $CONDA_PREFIX 设置为 $BUILD_PREFIX? - Why is $CONDA_PREFIX set to $BUILD_PREFIX during the build process of conda-build? 使用 conda-build 构建 conda 包时如何包含 pip-only 包? - How to include pip-only package when building conda package by using conda-build? 官方 AnacondaRecipes/opencv-feedstock 的 conda-build 无法查找 libpng.h - conda-build of official AnacondaRecipes/opencv-feedstock fails looking for libpng.h
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM