pytorch3d/packaging/build_conda.sh
Jeremy Reizenstein 6053d0e46f fvcore channel priority
Summary: As remarked in #655, we need to specify the fvcore channel before conda-forge, because there is now an fvcore on conda-forge which we don't aim to use. Compare D27589827

Reviewed By: nikhilaravi

Differential Revision: D27938996

fbshipit-source-id: 8abf7994a26e0ea9e6a19fb1e246aba7af091ddc
2021-04-22 14:13:44 -07:00

30 lines
966 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
set -ex
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. "$script_dir/pkg_helpers.bash"
VERSION=$(python -c "exec(open('${script_dir}/../pytorch3d/__init__.py').read()); print(__version__)")
# Prevent dev tag in the version string.
export BUILD_VERSION=$VERSION
export BUILD_TYPE=conda
setup_env "$VERSION"
export SOURCE_ROOT_DIR="$PWD"
setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint
if [[ "$JUST_TESTRUN" == "1" ]]
then
# We are not building for other users, we
# are only trying to see if the tests pass.
# So save time by only building for our own GPU.
unset NVCC_FLAGS
fi
# shellcheck disable=SC2086
conda build $CONDA_CHANNEL_FLAGS ${TEST_FLAG:-} -c bottler -c defaults -c fvcore -c iopath -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/pytorch3d