fix and pythonify conda build (#1394)

Summary:
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1394

The bash logic for building conda packages became fiddly to edit. We need to switch cuda-toolkit to pytorch-cuda when PyTorch>=1.12 which was going to be a pain, so here I rewrite the code in python and do it.

Reviewed By: shapovalov

Differential Revision: D42036406

fbshipit-source-id: 8bb80c2f7545477182b23fc97c8514dcafcee176
This commit is contained in:
Jeremy Reizenstein
2022-12-15 03:22:07 -08:00
committed by Facebook GitHub Bot
parent b7a316232a
commit c773830b88
4 changed files with 138 additions and 38 deletions

View File

@@ -117,7 +117,7 @@ jobs:
- run:
name: build
no_output_timeout: 20m
command: MAX_JOBS=15 TEST_FLAG=--no-test packaging/build_conda.sh
command: MAX_JOBS=15 TEST_FLAG=--no-test python3 packaging/build_conda.py
- store_artifacts:
path: /opt/conda/conda-bld/linux-64
- persist_to_workspace:
@@ -154,7 +154,7 @@ jobs:
export JUST_TESTRUN=1
VARS_TO_PASS="-e PYTHON_VERSION -e BUILD_VERSION -e PYTORCH_VERSION -e CU_VERSION -e JUST_TESTRUN"
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${TESTRUN_DOCKER_IMAGE} ./packaging/build_conda.sh
docker run --gpus all --ipc=host -v $(pwd):/remote -w /remote ${VARS_TO_PASS} ${TESTRUN_DOCKER_IMAGE} python3 ./packaging/build_conda.py
binary_macos_wheel:
<<: *binary_common