kurulum-3

# Uzak sunucuda karakter kaynaklı hataları gidermek için aşağıdaki komutları çalıştırınız.
echo ‘export LC_CTYPE=en_US.UTF-8’ >> ~/.bashrc
echo ‘export LC_ALL=en_US.UTF-8’ >> ~/.bashrc
source ~/.bashrc

# Sistem güncelleme
sudo apt-get update && sudo apt-get -y upgrade
# Cuda kurulumu
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb
mv cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda -y

#https://yangcha.github.io/GTX-1080/
echo ‘export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}’ >> ~/.bashrc
echo ‘export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}’ >> ~/.bashrc

# Cudnn Kurulumu
wget http://www.derinogrenme.com/file/cudnn-8.0-linux-x64-v6.0.tgz
tar -zxf cudnn-8.0-linux-x64-v6.0.tgz
cd cuda
sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/
sudo cp include/* /usr/local/cuda-8.0/include/
###############ilave bilgi-işlem yapma##############################
#Ayar işi
#sudo pico /etc/hosts
#127.0.0.1 ip-10-0-0-***
# Bilgi: Adding -P retains the symbolic links, i.e. sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/, and avoids the message: /sbin/ldconfig.real: /usr/lib/x86_64-linux-gnu/libcudnn.so.5 is not a symbolic link
##############ilave bilgi-işlem yapma###############################

##Cuda test
# cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery
# sudo make
# ./deviceQuery
##Cuda test

cd ~
##NCLL-birden fazla GPU varsa##
# git clone https://github.com/NVIDIA/nccl.git
# cd nccl
# sudo make install -j32
##NCLL son##

##DIGITS Kurulumu
sudo apt-get install –no-install-recommends git graphviz python-dev python-flask python-flaskext.wtf python-gevent python-h5py python-numpy python-pil python-pip python-protobuf python-scipy -y

#Caffe Kurulumu
sudo apt-get install –no-install-recommends build-essential cmake git gfortran libatlas-base-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libboost-thread-dev libgflags-dev libgoogle-glog-dev libhdf5-serial-dev libleveldb-dev liblmdb-dev libopencv-dev libprotobuf-dev libsnappy-dev protobuf-compiler python-all-dev python-dev python-h5py python-matplotlib python-numpy python-opencv python-pil python-pip python-protobuf python-scipy python-skimage python-sklearn python-setuptools python-tk -y

export CAFFE_ROOT=~/caffe
echo ‘export CAFFE_ROOT=~/caffe’ >> ~/.bashrc
git clone https://github.com/NVIDIA/caffe.git $CAFFE_ROOT
sudo pip install -r $CAFFE_ROOT/python/requirements.txt

#hata alırsan https://github.com/NVIDIA/DIGITS/blob/master/docs/BuildCaffe.md adresine bak

cd $CAFFE_ROOT
cp Makefile.config.example Makefile.config
sudo sed -i ‘s/# USE_CUDNN := 1/USE_CUDNN := 1/’ Makefile.config
#Çoklu GPU detseği istenirse
# sudo sed -i ‘s/# USE_NCCL := 1/USE_NCCL := 1/’ Makefile.config

# Enable with python layer
sudo sed -i ‘s/# WITH_PYTHON_LAYER := 1/WITH_PYTHON_LAYER := 1/’ Makefile.config

# Eğer hdf5 hatası alınırsa
# Add hdf5 library path and dir
# echo “INCLUDE_DIRS += /usr/include/hdf5/serial” >> Makefile.config
# echo “LIBRARY_DIRS += /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial” >> Makefile.config

mkdir build
cd build
cmake ..
make –jobs $(nproc)
#Caffe Kurulum bitti

#Torch Kurulumu
cd ~
sudo apt-get install –no-install-recommends git software-properties-common -y
export TORCH_ROOT=~/torch
echo ‘export TORCH_ROOT=~/torch’ >> ~/.bashrc
git clone https://github.com/torch/distro.git $TORCH_ROOT –recursive
cd $TORCH_ROOT
./install-deps
./install.sh -b
source ~/.bashrc

sudo apt-get install –no-install-recommends libhdf5-serial-dev liblmdb-dev -y
luarocks install tds
luarocks install dpnn
luarocks install “https://raw.github.com/deepmind/torch-hdf5/master/hdf5-0-0.rockspec”
luarocks install “https://raw.github.com/Neopallium/lua-pb/master/lua-pb-scm-0.rockspec”
luarocks install lightningmdb 0.9.18.1-1 LMDB_INCDIR=/usr/include LMDB_LIBDIR=/usr/lib/x86_64-linux-gnu
# If you have installed NCCL
# luarocks install “https://raw.githubusercontent.com/ngimel/nccl.torch/master/nccl-scm-1.rockspec”

cd ~
pip install –upgrade pip
DIGITS_ROOT=~/digits
echo ‘export DIGITS_ROOT=~/digits’ >> ~/.bashrc
git clone https://github.com/NVIDIA/DIGITS.git $DIGITS_ROOT
sudo pip install -r $DIGITS_ROOT/requirements.txt
sudo pip install -e $DIGITS_ROOT
#Text Classification
sudo pip install $DIGITS_ROOT/plugins/data/textClassification
sudo pip install $DIGITS_ROOT/plugins/view/textClassification
#The Sunnybrook plug-in
sudo pip install $DIGITS_ROOT/plugins/data/sunnybrook/

#Jupyter Notebook kurulumu: http://blog.impiyush.com/2015/02/running-ipython-notebook-server-on-aws.html
#https://github.com/mGalarnyk/Installations_Mac_Ubuntu_Windows/blob/master/AWS/Part_4_IPython_Notebook_Server_on_AWS_EC2_Instance.ipynb
sudo apt-get -y install ipython ipython-notebook
sudo pip install jupyter

#itorch kurulumu
cd ~
sudo apt-get install -y libssl-dev
luarocks install lzmq
git clone https://github.com/facebook/iTorch.git
cd iTorch
luarocks make

cd ~
jupyter notebook –generate-config
mkdir certs
cd certs
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
#Sorulan sorulara cevap olarak aşağıdaki gibi cevap verin ve entera basın
#Country Name (2 letter code) [AU]:TR
#State or Province Name (full name) [Some-State]:Ankara
#Locality Name (eg, city) []:.
#Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
#Organizational Unit Name (eg, section) []:.
#Common Name (e.g. server FQDN or YOUR name) []:.
#Email Address []:.

cd ~/.jupyter/
nano jupyter_notebook_config.py
#Dosyanın en üstüne aşağıdakileri yaz ve kaydet
##############basla
c = get_config()

c.IPKernelApp.pylab = ‘inline’
c.NotebookApp.certfile = u’/home/openzeka/certs/mycert.pem’
c.NotebookApp.ip = ‘*’
c.NotebookApp.open_browser = False
c.NotebookApp.password = u’sha1:c6a94092eed9:aaa1432e3651a0af955c513b92d2e2c0bbc78e7d’
c.NotebookApp.port = 8888
#############bitir

#nohup jupyter notebook
#cd ~/caffe/examples
#jupyter notebook
#Çalışıyorsa herşey hazır demektir.

# Şifreyle ilgili kısım bilgi maksatlı
# şifre: openzeka
# ‘sha1:c6a94092eed9:aaa1432e3651a0af955c513b92d2e2c0bbc78e7d’

#Crontab
#Aşağıdaki dosyayı start-digits.sh olarak kaydet
cd ~
pico start-digits.sh
#Aşağıdaki içeriği dosyaya kaydet
###basla
#!/bin/bash
export CAFFE_ROOT=/home/openzeka/caffe
export TORCH_ROOT=/home/openzeka/torch
. /home/openzeka/torch/install/bin/torch-activate
cd /home/openzeka/digits
./digits-devserver
##bitir

chmod +x start-digits.sh
####
#Aşağıdaki dosyayı start-jupyter.sh olarak kaydet
pico start-jupyter.sh
#Aşağıdaki içeriği dosyaya kaydet
###basla
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
cd ~/caffe/examples
jupyter notebook
##bitir

chmod +x start-jupyter.sh
crontab -e
#2 seç ve entera bas aşağıdakileri sayfa sonuna ekle
@reboot /home/openzeka/start-digits.sh > /home/openzeka/digits.log 2>&1
@reboot /home/openzeka/start-jupyter.sh > /home/openzeka/jupyter.log 2>&1

Scroll to top