build_conda.sh 765 Bytes
Newer Older
1
2
3
#!/bin/bash
set -ex

4
5
echo FFMPEG_ROOT=${FFMPEG_ROOT}

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

9
export BUILD_TYPE="conda"
10
setup_env
11
12
export SOURCE_ROOT_DIR="$PWD"
setup_conda_pytorch_constraint
13
setup_conda_cudatoolkit_constraint
14
setup_visual_studio_constraint
15
16

export CUDATOOLKIT_CHANNEL="nvidia"
17
18
19
20
# NOTE: There are some dependencies that are not available for macOS on Python 3.10 without conda-forge
if [[ ${OSTYPE} =~ darwin* ]] && [[ ${PYTHON_VERSION} = "3.10" ]]; then
    CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c conda-forge"
fi
21
22

conda build -c defaults -c $CUDATOOLKIT_CHANNEL ${CONDA_CHANNEL_FLAGS:-}  --no-anaconda-upload --no-test --python "$PYTHON_VERSION"  packaging/torchaudio