First, install the following packages
$ sudo apt-get install texlive texlive-formats-extra texlive-bibtex-extra biber texlive-science
$ pdflatex thesis.tex # hit enter if it shows question mark
$ biber thesis
$ pdflatex thesis.tex
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -dPrinted=false -sOutputFile=thesis-compressed.pdf thesis.pdf