Kurulum

echo “export LC_CTYPE=en_US.UTF-8” >> ~/.bashrc
echo “export LC_ALL=en_US.UTF-8” >> ~/.bashrc
source ~/.bashrc

sudo apt-get update && sudo apt-get -y upgrade

#Cuda kurulumu
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
mv cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-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’ >> ~/.bashrc

#Cudnn Kurulumu
wget http://www.derinogrenme.com/cudnn-8.0-linux-x64-v5.1.tgz
tar -zxf cudnn-8.0-linux-x64-v5.1.tgz
cd cuda

#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
sudo cp lib64/* /usr/local/cuda-8.0/lib64/
sudo cp include/* /usr/local/cuda-8.0/include/
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

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

#NCLL
#cd ~
#git clone https://github.com/NVIDIA/nccl.git
#cd nccl
#sudo make install -j32

#Caffe
sudo apt-get install –no-install-recommends build-essential cmake git gfortran libatlas-base-dev libboost-all-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

#export LANGUAGE=en_US.UTF-8
#export LANG=en_US.UTF-8
#export LC_ALL=en_US.UTF-8
#sudo locale-gen en_US.UTF-8
#sudo dpkg-reconfigure locales

#sudo apt-get install python-setuptools
#sudo apt-get install python-tk

export CAFFE_ROOT=~/caffe
echo “export CAFFE_ROOT=~/caffe ” >> ~/.bashrc
echo “export PYTHONPATH=~/caffe/python:$PYTHONPATH ” >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/NVIDIA/caffe.git $CAFFE_ROOT

sudo pip install -r $CAFFE_ROOT/python/requirements.txt

cd $CAFFE_ROOT
cp Makefile.config.example Makefile.config
# Enable cuDNN usage
sudo sed -i ‘s/# USE_CUDNN := 1/USE_CUDNN := 1/’ Makefile.config

#Test edeceğiz
#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

# 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=6
cd ~

#Torch: https://github.com/NVIDIA/DIGITS/blob/master/docs/BuildTorch.md
sudo apt-get install –no-install-recommends git software-properties-common
export TORCH_ROOT=~/torch

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
luarocks install tds
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”

#Digits kurulumu
cd ~
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
DIGITS_ROOT=~/digits
echo “export DIGITS_ROOT=~/digits ” >> ~/.bashrc
source ~/.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

# Örneklerle ilgili kurulumlar

#Metin sınıflandırma
#pip install -e $DIGITS_ROOT
sudo pip install $DIGITS_ROOT/plugins/data/textClassification
sudo pip install $DIGITS_ROOT/plugins/view/textClassification
# Medikal görüntü sınıflandırma
sudo pip install $DIGITS_ROOT/plugins/data/sunnybrook/

luarocks install dpnn

#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
pip install –upgrade pip
sudo apt-get -y install ipython ipython-notebook
sudo pip install jupyter

#itorch
#gerekli
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 ve entera bas
#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
##############
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
#############

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

# Şifreyle iligli 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
#!/bin/bash
export CAFFE_ROOT=/home/openzeka/caffe
cd /home/openzeka/digits
./digits-devserver

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

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

#####################################################################
#Eğitimde kullanılacak dosyaların indirilmesi
#####################################################################
#caffe/examples altında çalışacak jupyter notebook örnekleri için: classification ve fine-tune
cd ~/caffe
./scripts/download_model_binary.py models/bvlc_reference_caffenet
./data/ilsvrc12/get_ilsvrc_aux.sh

#MNIST Örneği veriseti derinogrenme.com sunucusunda çekilecek
#notebook içinde güncelleme yapılacak, digits adresi düzeltilecek
cd ~/caffe/examples
wget http://www.derinogrenme.com/file/notebook.tar.gz
tar -xzvf notebook.tar.gz

#MNIST dataset ~/data klasörüne açılacak
cd ~
wget http://www.derinogrenme.com/file/file.tar.gz
tar -xzvf file.tar.gz

#Semantik Segmentasyon Örneği Veri Seti
cd ~/digits/examples/semantic-segmentation/
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
./prepare_pascal_voc_data.sh VOCtrainval_11-May-2012.tar ./voc-data
wget http://www.derinogrenme.com/file/fcn_alexnet.caffemodel

#Obje Tespiti
cd ~/digits/examples/object-detection/
wget http://kitti.is.tue.mpg.de/kitti/data_object_image_2.zip
wget http://kitti.is.tue.mpg.de/kitti/data_object_label_2.zip
wget http://kitti.is.tue.mpg.de/kitti/devkit_object.zip
./prepare_kitti_data.py

#Medikal Segmentasyon
cd ~/digits/plugins/data/sunnybrook/
wget http://smial.sri.utoronto.ca/LV_Challenge/DataDownloads/download?file=13f7d82eb6692688c
wget http://smial.sri.utoronto.ca/LV_Challenge/DataDownloads/download?file=13d41c04bb504e080
#dosya uzantıları farklı olmazsa aşağıdaki komutlar dosyaları acacaktır
unzip challenge_training.zip
unzip Sunnybrook_Cardiac_MR_Database_ContoursPart3.zip
# unzip yapılamazsa ve hata alırsan aşağıdaki paketi kur
#sudo apt-get install unzip

#Metin Sınıflandırma
cd ~/digits/examples/text-classification
wget http://www.derinogrenme.com/file/dbpedia_csv.tar.gz
tar -xzvf dbpedia_csv.tar.gz

#CIFAR10
cd ~/data
wget http://www.derinogrenme.com/file/cifar10.tar.gz
tar -xzvf cifar10.tar.gz

############################Aşağısı eklenecek##############
#Obje Tespiti
cd ~/caffe/models/bvlc_googlenet/
wget http://www.derinogrenme.com/file/bvlc_googlenet.caffemodel

#Caffe yolo
cd ~/caffe/models
git clone https://github.com/xingwangsfu/caffe-yolo.git
mkdir weights
cd ~/caffe/models/caffe-yolo/weights
wget http://40.121.211.67:5000/static/file/yolo_small.caffemodel
#yolo.ipynb
cd ~/caffe/examples/
wget http://www.derinogrenme.com/file/yolo.ipynb

#wget http://pjreddie.com/media/files/yolo.weights
#wget http://pjreddie.com/media/files/yolov1.weights
#wget http://pjreddie.com/media/files/tiny-yolo.weights
#wget http://pjreddie.com/media/files/yolo.rescore.weights
#wget http://pjreddie.com/media/files/yolo-coco.weights
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/tiny-coco.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/tiny-yolo.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/xyolo.test.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/yolo-coco.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/yolo-small.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/yolo.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/yolo.train.cfg
#wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov1/yolo2.cfg

#Eğitim devame den makine
http://13.90.90.32:5000/

#Obje Tespiti

#untar tar -xzvf

#Fine tuning
cd ~
python -m digits.download_data mnist ~/mnist
cd ~/digits/examples/fine-tuning
./create_dataset.sh odd_or_even_dataset ~/mnist/train

#dpedia
#sudo mkdir -p ../super/digits/data/dbpedia_csv/
#sudo cp ~/digits/examples/text-classification/dbpedia_csv/classes.txt /home/super/digits/data/dbpedia_csv/classes.txt

#jobs
cd ~/digits/digits/jobs
tar -czvf pre_jobs.tar.gz 20170113-154219-33ed 20170113-162434-5b04

Scroll to top