From 44afdb50eccdeb7baf74f227c239570856edea26 Mon Sep 17 00:00:00 2001 From: sugarme Date: Wed, 9 Mar 2022 21:29:24 +1100 Subject: [PATCH] updated installation script --- setup-gotch.sh | 4 ++++ setup-libtorch.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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//./}"