Building from source with conda build

We need to build pytorch from source with our own patch and custom libraries. (version v1.4.0) and distribute it as conda package.

There is an excellent Dockerfile in the main repository, we manage to build with it everything with few changes.
However we encounter many bugs when trying to use pytorch/builder/conda (building fails and can’t see where the bug is, its probably some environment issue).
I wonder, as we already have a working built (modified) pytorch on the Docker image,
Can we use it somehow to distribute a conda package?
Any other workaround?


This repo is really only used for our internal CI and tailored to build the binaries on circleci’s machine (not intended for other use).
What is the exact issue you’re seeing?

The build fails even though I use the same dockerfile from the repo, all I add is openmpi. (but it fails without it too).
In the new Dockerfile from main pytorch repo it is working with only 1 line change.

I don’t fully understand where it fails and what causing the failure in pytorch/builder.
I made it work ~4 months ago for the nightly version, but I can’t make it work again for pytorch 1.4 (or later).

cc @seemethere might know if it would be easy to re-purpose torch/builder to run outside our CI infra?