diff --git a/setup-gotch.sh b/setup-gotch.sh index 7e83972..f61cd4d 100644 --- a/setup-gotch.sh +++ b/setup-gotch.sh @@ -2,6 +2,10 @@ GOTCH_VERSION="${GOTCH_VER:-v0.5.0}" CUDA_VERSION="${CUDA_VER:-11.1}" + +if [ -z $GOPATH ] then + $GOPATH="$HOME/go" +fi GOTCH_PATH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION" # Install gotch diff --git a/setup-libtorch.sh b/setup-libtorch.sh index eb82d07..1636930 100644 --- a/setup-libtorch.sh +++ b/setup-libtorch.sh @@ -3,7 +3,7 @@ LIBTORCH_VERSION="${LIBTORCH_VER:-1.10.0}" CUDA_VERSION="${CUDA_VER:-11.1}" -if [[ -z "${CUDA_VERSION}"=="cpu" ]]; then +if [ "${CUDA_VERSION}"=="cpu" ]; then CU_VERSION="cpu" else CU_VERSION="cu${CUDA_VERSION//./}"