fixed scripts
This commit is contained in:
parent
6d735e3520
commit
ae240dd054
|
@ -1,24 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Env
|
||||
export GOTCH_VERSION="v0.1.1"
|
||||
export GOTCH_VERSION="v0.1.2"
|
||||
export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"
|
||||
export LIBRARY_PATH=$LIBTORCH/lib
|
||||
export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc:$LIBTORCH/include/torch/csrc/api/include
|
||||
export LD_LIBRARY_PATH=$LIBTORCH/lib:$LD_LIBRARY_PATH
|
||||
|
||||
# Precompiled libtorch
|
||||
sudo rm -rf $LIBTORCH
|
||||
sudo mkdir -p $LIBTORCH
|
||||
wget -O /tmp/libtorch-cxx11-abi-shared-with-deps-1.5.1+cpu.zip https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcpu.zip
|
||||
sudo unzip /tmp/libtorch-cxx11-abi-shared-with-deps-1.5.1+cpu.zip -d $LIBTORCH
|
||||
|
||||
# Update .bashrc
|
||||
FILE='$HOME/.bashrc'
|
||||
LN_LIBTORCH = 'export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"'
|
||||
LN_LIBRARY_PATH = 'export LIBRARY_PATH=$LIBTORCH/lib'
|
||||
LN_CPATH = 'export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc:$LIBTORCH/include/torch/csrc/api/include'
|
||||
LN_LD_LIBRARY_PATH = 'export LD_LIBRARY_PATH=$LIBTORCH/lib:$LD_LIBRARY_PATH'
|
||||
export FILE='$HOME/.bashrc'
|
||||
export LN_LIBTORCH='export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"'
|
||||
export LN_LIBRARY_PATH='export LIBRARY_PATH=$LIBTORCH/lib'
|
||||
export LN_CPATH='export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc:$LIBTORCH/include/torch/csrc/api/include'
|
||||
export LN_LD_LIBRARY_PATH = 'export LD_LIBRARY_PATH=$LIBTORCH/lib:$LD_LIBRARY_PATH'
|
||||
sudo grep -qF -- "$LN_LIBTORCH" "$FILE" || sudo echo "$LN_LIBTORCH" >> "$FILE"
|
||||
sudo grep -qF -- "$LN_LIBRARY_PATH" "$FILE" || sudo echo "$LN_LIBRARY_PATH" >> "$FILE"
|
||||
sudo grep -qF -- "$LN_CPATH" "$FILE" || sudo echo "$LN_CPATH" >> "$FILE"
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
export GOTCH_VERSION="v0.1.1"
|
||||
export GOTCH_VERSION="v0.1.2"
|
||||
export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"
|
||||
export LIBRARY_PATH=$LIBTORCH/lib
|
||||
export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc/api/include
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBTORCH/lib:/usr/lib64-nvidia:/usr/local/cuda-10.1/lib64
|
||||
|
||||
sudo rm -rf $LIBTORCH
|
||||
sudo mkdir -p $LIBTORCH
|
||||
wget -O /tmp/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcu101.zip https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcu101.zip
|
||||
sudo unzip /tmp/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcu101.zip -d $LIBTORCH
|
||||
|
||||
# update .bashrc
|
||||
FILE='$HOME/.bashrc'
|
||||
LN_LIBTORCH = 'export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"'
|
||||
LN_LIBRARY_PATH = 'export LIBRARY_PATH=$LIBTORCH/lib'
|
||||
LN_CPATH = 'export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc/api/include'
|
||||
LN_LD_LIBRARY_PATH = 'export LD_LIBRARY_PATH=$LIBTORCH/lib:/usr/lib64-nvidia:/usr/local/cuda-10.1/lib64'
|
||||
export FILE='$HOME/.bashrc'
|
||||
export LN_LIBTORCH='export LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch"'
|
||||
export LN_LIBRARY_PATH='export LIBRARY_PATH=$LIBTORCH/lib'
|
||||
export LN_CPATH='export CPATH=$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc/api/include'
|
||||
export LN_LD_LIBRARY_PATH='export LD_LIBRARY_PATH=$LIBTORCH/lib:/usr/lib64-nvidia:/usr/local/cuda-10.1/lib64'
|
||||
sudo grep -qF -- "$LN_LIBTORCH" "$FILE" || sudo echo "$LN_LIBTORCH" >> "$FILE"
|
||||
sudo grep -qF -- "$LN_LIBRARY_PATH" "$FILE" || sudo echo "$LN_LIBRARY_PATH" >> "$FILE"
|
||||
sudo grep -qF -- "$LN_CPATH" "$FILE" || sudo echo "$LN_CPATH" >> "$FILE"
|
||||
|
|
Loading…
Reference in New Issue
Block a user