-
Notifications
You must be signed in to change notification settings - Fork 4
/
installer.sh
64 lines (46 loc) · 3.14 KB
/
installer.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
########################################################################################################################
## SOFTWARE https://github.com/samuelterra22/tcc/
notify-send 'Obtendo projeto' 'Obtendo projeto mais atualizado do GitHub.' --icon=dialog-information
echo "Obtendo projeto mais atualizado do GitHub."
wget -c https://codeload.github.com/samuelterra22/tcc/zip/master -o tcc-master.zip
unzip tcc-master.zip
########################################################################################################################
## PYTHON libs
notify-send 'Instalando dependências' 'Iniciando instalação de dependências para a execução do Placement.' --icon=dialog-information
sudo apt-get update
sudo apt-get install -y build-essential llvm libsdl1.2-dev libglew1.5-dev freeglut3-dev mesa-common-dev kcachegrind cprofilev
sudo apt-get -y install python-pip && sudo -H pip install --upgrade pip
sudo -H pip install ezdxf numpy numba matplotlib pygame colour datetime llvmpy pyprof2calltree
sudo -H pip install tk || sudo apt install -y python-tk
sudo apt install python3-tk
########################################################################################################################
## CUDA
notify-send 'Obtendo Cuda' 'Iniciando download do CUDA. O arquivo de instalação tem aproximadamente 1,2 GB. O processo de download pode levar alguns minutos.' --icon=dialog-information
echo "Iniciando download do CUDA. O arquivo de instalação tem aproximadamente 1,2 GB. O processo de download pode levar alguns minutos."
wget -c https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
notify-send 'Instalando Cuda' 'Iniciando instalação do CUDA apartir do arquivo baixado.' --icon=dialog-information
echo "Iniciando instalação do CUDA apartir do arquivo baixado."
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
#sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install -f
sudo apt-get -y install cuda cuda-9-0 cuda-toolkit-9-0 cuda-runtime-9-0 cuda-libraries-9-0 cuda-libraries-dev-9-0 cuda-drivers
sudo sed -i 's/"$/:\/usr\/local\/cuda-8.0\/bin"/' /etc/environment
source /etc/environment
notify-send 'Instalação finalizada.' 'A instalação do CUDA foi finalizada.' --icon=dialog-information
echo "A instalação do CUDA foi finalizada."
echo "Versão do nvcc:\n"
nvcc --version
echo "\nResumo do driver instalado:\n"
nvidia-smi
## HOWTO: http://www.pradeepadiga.me/blog/2017/03/22/installing-cuda-toolkit-8-0-on-ubuntu-16-04/
## HOWTO: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal
########################################################################################################################
## TEST
python CAD/draw.py
########################################################################################################################
## RUN
#python PlacementGPU.py
python PlacementAPs.py