Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, January 12, 2016

Install Caffe with GPU support without pain

This is my cheatsheet to install caffe with gpu support on an ubuntu machine.
https://gist.github.com/hasantayyar/1023dbdb01647b0c9559


apt-get update && apt-get install -q -y \
  wget \
  build-essential \
  module-init-tools

cd /opt && \
  wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run && \
  chmod +x *.run && \
  mkdir nvidia_installers && \
  ./cuda_7.0.28_linux.run -extract=`pwd`/nvidia_installers && \
  cd nvidia_installers && \
  ./NVIDIA-Linux-x86_64-346.46.run -s -N --no-kernel-module && \
  ./cuda-linux64-rel-7.0.28-19326674.run -noprompt

#ENV LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-7.0/lib64

#ENV PYTHONPATH=/opt/caffe/python

#ENV PATH $PATH:/opt/caffe/.build_release/tools

apt-get update && apt-get install -y \
  bc cmake curl git
  gcc-4.6 g++-4.6 gcc-4.6-multilib g++-4.6-multilib \
  gfortran unzip wget \
  libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev \
  libboost-all-dev \
  libhdf5-serial-dev \
  liblmdb-dev libjpeg62 libfreeimage-dev libatlas-base-dev \
  pkgconf protobuf-compiler \
  python-dev python-pip python-yaml python-numpy

# you may not need to change your gcc version
# update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-4.6 30 && \
  update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-4.6 30 && \
  update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 30 && \
  update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 30

# Allow it to find CUDA libs
echo "/usr/local/cuda/lib64" > /etc/ld.so.conf.d/cuda.conf && \
ldconfig
# Clone caffe
cd /opt && git clone https://github.com/BVLC/caffe.git

# you may not need to install glog. but caffe will log warnings until you've glog installed.
cd /opt && wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz && \
  tar zxvf glog-0.3.3.tar.gz && \
  cd /opt/glog-0.3.3 && \
  ./configure && \
  make && \
  make install

ldconfig

cd /opt && \
  wget https://github.com/schuhschuh/gflags/archive/master.zip && \
  unzip master.zip && \
  cd /opt/gflags-master && \
  mkdir build && \
  cd /opt/gflags-master/build && \
  export CXXFLAGS="-fPIC" && \
  cmake .. && \
  make VERBOSE=1 && make && make install

cd /opt/caffe && \
  cp Makefile.config.example Makefile.config

# echo "CXX := /usr/bin/g++-4.6" >> Makefile.config && sed -i 's/CXX :=/CXX ?=/' Makefile && \
make all -j8

# link caffe-ld-so.conf under /etc/ld.so.conf.d/

ldconfig

# you can install pillow from apt python-pil
easy_install pillow 

# You can find apt alternatives for these python deps.
cd /opt/caffe/python ; \
      for req in $(cat requirements.txt); do pip install $req; done

cd /opt/caffe && make py

# Done

Friday, December 25, 2015

Friday, May 2, 2014

HHVM on Ubuntu 14.04

Ubuntu 14.04'e yükseltmişseniz HHV derlemek için gerekli paketler bunlar

  sudo apt-get install \
autoconf automake binutils-dev build-essential cmake g++ git \ 
libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev \ libboost-system-dev libboost-thread-dev libbz2-dev libc-client-dev \ 
libc-client2007e-dev libcap-dev libcurl4-openssl-dev libdwarf-dev libelf-dev \ 
libexpat-dev libgd2-xpm-dev libgoogle-glog-dev libgoogle-perftools-dev libicu-dev \ 
libjemalloc-dev libmcrypt-dev libmemcached-dev libmysqlclient-dev libncurses-dev \ 
libonig-dev libpcre3-dev libreadline-dev libtbb-dev libtool libxml2-dev zlib1g-dev libevent-dev \ 
libmagickwand-dev libinotifytools0-dev libiconv-hook-dev libedit-dev libiberty-dev libxslt1-dev ocaml-native-compilers

Monday, June 11, 2012

Xubuntu çift monitör sorunları

Ubuntu'da Xfce ile çift monitor ayarları tam bir işkence. Eğer ki  monitörlerinizden birisi farklı yönde çevrilmiş durumdaysa sizi çok uğraştıracaktır.  randr ile uğraşması berbat bir durum.
arandr daha görsel ve pratik bir araç. Oldukça küçük kullanışlı.

apt-get install arandr

veya kaynaktan

git clone git://gitorious.org/arandr/arandr.git

Tuesday, February 1, 2011

installing node.js - for lazy guys

Üşengeçseniz ve konuya yeniyseniz, vaktiniz yoksa vs Node.js kurmak ve hemen denemek için

sudo apt-get install g++ libssl-dev curl apache2-utils
sudo apt-get install git-core
git clone git://github.com/ry/node.git
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install

Saturday, November 20, 2010

my .vimrc

Her yeni sistemde temizce böyle ayarlarım hemen.

syntax on
set autoindent
set showmatch
set smartindent
set tabstop=4
set shiftwidth=4
set ruler
set backup
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
set cul
hi CursorLine term=none cterm=none ctermbg=3
if has("autocmd")
  filetype plugin indent on
endif
set nu
set showcmd        
set showmatch     
set ignorecase      
set smartcase        
set incsearch         
set hidden 

Wednesday, January 6, 2010

wget ile cookie

TAVSİYE EDİYORUM

Mesela rapidshare'den dosyaları wget ile çekmek istedik. işte burada wget ile evvela cookileri yüklemek gerek. Rapidshare in sadece bir satı bir cookie bilgisi var.

(Önce rp panelinden "direct download" aktif hale getirilmeli)
Daha sonra rp'e giriş yapınca elinizdeki cookie'yi bir metin belgesine saklayın (mesela rpcookie.txt içine).

.rapidshare.com TRUE / FALSE 1122334455 user 111111-%20%20%20%20%20%20%20%20

ve sonrasında şu kod yeterli olacaktır

wget --load-cookies=rpcookie.txt http://rapidshare.com/files/319105750/Debut.rar

(rapidshare linki örnektir :) )




konuyu irdelemek için
http://www.g-loaded.eu/2007/09/15/use-wget-or-curl-to-download-from-rapidshare-premium/

Friday, July 24, 2009

ftp sunucumu yerel bir dizine bağlamak

ÖĞRENDİM

Bazı sevdiğim php editörlerin ya ftp desteği yok ya da zahmetli bir eklentisi var. Ben de sıkıldım ve google'a sordum acaba bir ftp sunucusu en kolay nasıl yerel dosya sistemine bağlanır diye. Sonra baktım ki bunun çok kolay bir yolu varmış.

http://curlftpfs.sourceforge.net/

hemen şöyle indirdim kurdum. Ufacık bir şey zaten.

sudo apt-get install curlftpfs


sonra da şöyle bağladım :

curlftpfs ftp://kullanici:parola@sunucum.com/  /home/hasantayyar/public_html/sunucum


Artık /home/hasantayyar/public_html/sunucum dizinine girdiğimde ftp sunucumun içeriğini görüyorum.

Araştırırken bir de alternatif bulmuştum. Denemek için gözatılabilir.
http://www.howtogeek.com/howto/ubuntu/how-to-mount-a-remote-folder-using-ssh-on-ubuntu/

Konuyu irdelemek derinlemesine için:
http://www.belgeler.org/man/man8/man8-mount.html

http://en.wikipedia.org/wiki/Mount
http://wiki.linux-sevenler.org/index.php/Mount
http://www.linux-ntfs.org/doku.php?id=howto:mount
http://www.belgeler.org/glibc/glibc-Mount-Unmount-Remount.html