As I mentioned in previous posts. This is a tricky problem and can take quite some time to get the right versions and dependencies figured out. That is the joy or working with opencv, linux and caffe (sarcasm)
Here is a link to a script I used to get opencv working to use with caffe. I tried installing opencv 3.0 but failed because of some issues with that version. I also tried getting 2.4.9 installed and also failed because wasn't compatible with my cuda library since I have CUDA 7.0 and a Titan X.
After many tries, installing the dependecies in this link helped. Please share your solutions if you found some issues.
https://github.com/olivernina/ubuntu-scripts/blob/master/install-opencv.sh
I also found some useful information in this link :
http://milq.github.io/install-opencv-ubuntu-debian/
Also I noticed that it helped to add my libraries to my LD path
export LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/local/lib
And also anytime there was an error on compiling opencv and I needed to recompile it was better to erase the build directory and start all over. But of course everyone knows this right? :)
Thursday, November 19, 2015
Thursday, November 12, 2015
Rename external hard drive in Linux
Usually hard drives have long names and you just want to rename them. One easy way to do that is by using label commands in Linux. For instance:
sudo ntfslabel /dev/sdd1 sea1
where sea1 is the new name.
You also need to know which drive is which to do that you can just do:
sudo fdisk -l
If you want to know which type of file system you have, you can do:
blkid /dev/sdd1
If you have exFAT then just use :
sudo exfatlabel /dev/sdd1 sea1
sudo ntfslabel /dev/sdd1 sea1
where sea1 is the new name.
You also need to know which drive is which to do that you can just do:
sudo fdisk -l
If you want to know which type of file system you have, you can do:
blkid /dev/sdd1
If you have exFAT then just use :
sudo exfatlabel /dev/sdd1 sea1
Tuesday, October 20, 2015
git commit error due to large files
I couldn't commit apparently because something was cashed. I found this workaround
git stash save --keep-index
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch path2file'
Friday, October 16, 2015
Recently I had an issue with updating my log file and csv file from python when working on a cluster. Even though I waited for a long time the files were not being updated only when the script finished. In order to fix this I researched what other people have done. By flushing every so often the files will update. This solution worked for me. Hopefully it will work for you
import csv
import sys
csvfile = open('results/test.csv','wb')\
csvout = csv.writer(csvfile,delimiter=',',quotechar='"')sys.stdout = open('results/log.txt','w')for it in xrange(max_iters): # rest of the program csvout.writerow(['test1','test2']) csvfile.flush() sys.stdout.flush()
Thursday, September 10, 2015
startx timeout in locking authority file
I found this solution in one of the forums: I pretty much copied and paste the solution here
check
ls -l ~/.Xauthority
It should be owned by you. If not, run
sudo chown user ~/.Xauthority
where user is your username
Then, run
Then, run
chmod u+rw ~/.Xauthority
startx
Monday, January 12, 2015
Error compiling MatConvNet in Ubuntu
I realized that compiling MatConvNet in Ubuntu is better to do it from the linux shell as supposed to from matlab. From matlab I would get this message after following the instructions:
vl_compilenn: CUDA: MEX config file: '.../matconvnet/matlab/src/config/mex_CUDA_glnxa64.sh'
gcc-4.4: No such file or directory
However, after compiling from the bash shell the tests would all pass.
This was my command from the command
make ENABLE_GPU=y ARCH=glnxa64 MATLABROOT=/usr/local/MATLAB/R2014a/ CUDAROOT=/usr/local/cuda-5.5/
vl_compilenn: CUDA: MEX config file: '.../matconvnet/matlab/src/config/mex_CUDA_glnxa64.sh'
gcc-4.4: No such file or directory
However, after compiling from the bash shell the tests would all pass.
This was my command from the command
make ENABLE_GPU=y ARCH=glnxa64 MATLABROOT=/usr/local/MATLAB/R2014a/ CUDAROOT=/usr/local/cuda-5.5/
Friday, October 10, 2014
tune2fs: Bad magic number in super-block while trying to open ... Couldn't find valid filesystem superblock
I was getting this error because I was using it on a exFat ssd hard drive which is used for windows and linux compatibility. If you want to change the label use instead exfatlabel. for instance
sudo exfatlabel /dev/sdb1 ssd
(If exfatlabel is not installed on your system you just need to do:
sudo apt-get install exfat-util)
you can also use sudo fdsik -l to see your hard drives and know which one you need to rename. And use sudo blkid /dev/sdb1 for instance to know what kind of file system you have if you have ntfs you might need to do for instance.
sudo ntfslabel /dev/sdb2 hd1
sudo exfatlabel /dev/sdb1 ssd
(If exfatlabel is not installed on your system you just need to do:
sudo apt-get install exfat-util)
you can also use sudo fdsik -l to see your hard drives and know which one you need to rename. And use sudo blkid /dev/sdb1 for instance to know what kind of file system you have if you have ntfs you might need to do for instance.
sudo ntfslabel /dev/sdb2 hd1
Subscribe to:
Posts (Atom)