build_conda.sh 1.07 KB
Newer Older
facebook-github-bot's avatar
facebook-github-bot committed
1
#!/bin/bash
2
# Copyright (c) Meta Platforms, Inc. and affiliates.
Patrick Labatut's avatar
Patrick Labatut committed
3
4
5
6
7
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

facebook-github-bot's avatar
facebook-github-bot committed
8
9
10
11
12
set -ex

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. "$script_dir/pkg_helpers.bash"

13
14
VERSION=$(python -c "exec(open('${script_dir}/../pytorch3d/__init__.py').read()); print(__version__)")

15
16
17
# Prevent dev tag in the version string.
export BUILD_VERSION=$VERSION

facebook-github-bot's avatar
facebook-github-bot committed
18
export BUILD_TYPE=conda
19
setup_env "$VERSION"
facebook-github-bot's avatar
facebook-github-bot committed
20
21
22
23
export SOURCE_ROOT_DIR="$PWD"
setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint
Jeremy Reizenstein's avatar
Jeremy Reizenstein committed
24
25
26
27
28
29
30
31
32

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

facebook-github-bot's avatar
facebook-github-bot committed
33
# shellcheck disable=SC2086
Jeremy Reizenstein's avatar
Jeremy Reizenstein committed
34
conda build $CONDA_CHANNEL_FLAGS ${TEST_FLAG:-} -c bottler -c fvcore -c iopath -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/pytorch3d