-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_pytorch.sh
37 lines (36 loc) · 1.39 KB
/
install_pytorch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
set -e
export CUDADIR=/usr/local/cuda-11.8
#export PYTORCH_NEEDS="cffi typing_extensions future six requests dataclasses pillow-simd pyyaml"
#dnf install -y libgomp git libsndfile libsndfile-devel libvorbis libvorbis-devel flac-libs flac-devel libmad libmad-devel lame-libs lame-devel opus opus-devel sox sox-devel opencv* openblas openblas-devel libjpeg-turbo-devel libpng-devel libpng libjpeg-turbo ninja-build
#mkdir /build
#cd /build
## BEGIN MAGMA
#export PATH=$PATH:${CUDADIR}/bin
#mkdir magma
#cd magma
#curl -L http://icl.utk.edu/projectsfiles/magma/downloads/magma-2.6.1.tar.gz | tar -xz
#cd magma-2.6.1
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CUDADIR}/lib64
#cp make.inc-examples/make.inc.openblas make.inc
#sed -i 's/GPU_TARGET =.*/GPU_TARGET = sm_61 sm_70 sm_75 sm_80/' make.inc
#export OPENBLASDIR=/usr
#export BACKEND=cuda
#LIBRARY_PATH=/usr/local/cuda/lib64 make -j16
#make install prefix=/opt/magma
#export MAGMA_HOME=/opt/magma
#unset OPENBLASDIR
#unset BACKEND
# END MAGMA
#cd /build
# BEGIN PYTORCH
# Pytorch stuff
python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# from source
#python3 -m pip install $PYTORCH_NEEDS
#git clone --recursive --branch v1.11.0 https://github.com/pytorch/pytorch
#cd pytorch
#git submodule sync
#git submodule update --init --recursive --jobs 0
##python setup.py install
#python3 -m pip install .