Arulkumar03/Fox_Sheep_Detector_Computer_Vision_model
0
1#!/bin/bash2# Copyright (c) Facebook, Inc. and its affiliates.3set -ex4 5ldconfig # https://github.com/NVIDIA/nvidia-docker/issues/8546 7script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"8. "$script_dir/pkg_helpers.bash"9 10echo "Build Settings:"11echo "CU_VERSION: $CU_VERSION" # e.g. cu10112echo "D2_VERSION_SUFFIX: $D2_VERSION_SUFFIX" # e.g. +cu101 or ""13echo "PYTHON_VERSION: $PYTHON_VERSION" # e.g. 3.714echo "PYTORCH_VERSION: $PYTORCH_VERSION" # e.g. 1.415 16setup_cuda17setup_wheel_python18 19yum install ninja-build -y20ln -sv /usr/bin/ninja-build /usr/bin/ninja || true21 22pip_install pip numpy -U23pip_install "torch==$PYTORCH_VERSION" \24 -f https://download.pytorch.org/whl/"$CU_VERSION"/torch_stable.html25 26# use separate directories to allow parallel build27BASE_BUILD_DIR=build/$CU_VERSION-py$PYTHON_VERSION-pt$PYTORCH_VERSION28python setup.py \29 build -b "$BASE_BUILD_DIR" \30 bdist_wheel -b "$BASE_BUILD_DIR/build_dist" -d "wheels/$CU_VERSION/torch$PYTORCH_VERSION"31rm -rf "$BASE_BUILD_DIR"32 