Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
709df98
commit fd40071
Showing
6 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ out*.jpg | |
out*.png | ||
examples/*.avi | ||
examples/tmp/* | ||
vagrant/.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
|
||
# Using Ubuntu Trusty (14.04) for now | ||
config.vm.box = "ubuntu/trusty64" | ||
|
||
# Give Box it's own IP | ||
config.vm.network "private_network", ip: "192.168.35.111" | ||
|
||
# Would you rather use port forwarding? comment out that last line and add these: | ||
# config.vm.network :forwarded_port, guest: 80, host: 8888 | ||
# config.vm.network :forwarded_port, guest: 3000, host: 3000 #common port for node, etc | ||
|
||
# Sync parent folder. Clone this repo into project folder. | ||
# I Like to work this way so I don't have vagrant files running all over my code. | ||
# Parent folder will have the name of your app | ||
config.vm.synced_folder "../", "/home/vagrant/"+File.basename(File.expand_path('..')) | ||
|
||
# EDIT THE SCRIPT REFERENCED BELOW TO | ||
config.vm.provision "shell", path: "setup.sh" | ||
|
||
config.vm.provider "virtualbox" do |v| | ||
#NAME THE VM -- You'll probably want to rename this box on a per-project basis. | ||
#For now, it should inherit the name of the parent folder | ||
v.name = "VDK - " + File.basename(File.expand_path('..')) | ||
|
||
# 512 is pretty tight to run Node.js on, if you're in to that sort of thing. I've boosted this. | ||
v.memory = 1024 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apt-get install gcc make build-essential -y | ||
apt-get install -y curl | ||
apt-get install -y git | ||
curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash - | ||
apt-get install -y nodejs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
apt-get update | ||
apt-get upgrade -y | ||
|
||
#INSTALL BASE | ||
chmod +x "/vagrant/scripts/base.sh" | ||
$include "/vagrant/scripts/base.sh" | ||
|
||
#COMMENT OUT OR IN LINES AS APPROPRIATE | ||
INCLUDED_TECH=() | ||
INCLUDED_TECH+=("node") | ||
#INCLUDED_TECH+=("mongodb") | ||
#INCLUDED_TECH+=("meteor") | ||
#INCLUDED_TECH+=("redis") | ||
#INCLUDED_TECH+=("apache") | ||
#INCLUDED_TECH+=("nginx") | ||
#INCLUDED_TECH+=("mysql") | ||
#INCLUDED_TECH+=("php") | ||
|
||
SCRIPT_LOCATION="/vagrant/scripts/setup-" | ||
|
||
for i in ${INCLUDED_TECH[@]}; do | ||
chmod +x "${SCRIPT_LOCATION}${i}.sh" | ||
$include "${SCRIPT_LOCATION}${i}.sh" | ||
done | ||
|
||
echo "Base Setup Done!" | ||
ls | ||
#INSTALL USER | ||
chmod +x "/vagrant/user.sh" | ||
$include "/vagrant/user.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export REPO_FOLDER="node-opencv" | ||
cd /home/vagrant/$REPO_FOLDER | ||
apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev | ||
mkdir opencv_lib | ||
cd /home/vagrant/$REPO_FOLDER/opencv_lib/ | ||
[ ! -f /home/vagrant/$REPO_FOLDER/opencv_lib/2.4.11.tar.gz ] && wget https://github.com/Itseez/opencv/archive/2.4.11.tar.gz && tar -zxvf2.4.11.tar.gz | ||
cd opencv-2.4.11 | ||
mkdir release | ||
cd release | ||
echo "Removing any pre-installed ffmpeg and x264" | ||
apt-get -y remove ffmpeg x264 libx264-dev | ||
echo "Installing Dependenices" | ||
apt-get -y install libopencv-dev | ||
apt-get -y install build-essential checkinstall cmake pkg-config yasm | ||
apt-get -y install libtiff4-dev libjpeg-dev libjasper-dev | ||
apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libdc1394-22 libdc1394-utils libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev | ||
apt-get -y install python-dev python-numpy | ||
apt-get -y install libtbb-dev | ||
apt-get -y install libqt4-dev libgtk2.0-dev | ||
apt-get -y install libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev | ||
apt-get -y install x264 v4l-utils ffmpeg libx264-dev | ||
apt-get -y install libgtk2.0-dev | ||
|
||
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON .. | ||
make install | ||
cd /home/vagrant/$REPO_FOLDER/ |