mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Remove Docker and vagrant
This commit is contained in:
parent
5aa8859fa9
commit
ac0c9fcc28
83
Dockerfile
83
Dockerfile
@ -1,83 +0,0 @@
|
||||
# This file describes how to build node-opencv into a runnable linux container with all dependencies installed
|
||||
# To build:
|
||||
# 1) Install docker (http://docker.io)
|
||||
# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile
|
||||
# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)"
|
||||
#
|
||||
# VERSION 0.3
|
||||
# DOCKER-VERSION 8.1.2
|
||||
|
||||
|
||||
# update to 14.04
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# listing myself as maintainer of _this_ Dockerfile, though I am not the author of the install script (credit to http://rodrigoberriel.com/)
|
||||
MAINTAINER borromeotlhs@gmail.com
|
||||
|
||||
# run Rodrigo Berriel’s script for installing opencv3 on Ubuntu 14.04
|
||||
# I’ll convert this into a full Dockerfile later, once I see if it works
|
||||
#COPY ./install-opencv3.sh /tmp/
|
||||
|
||||
# this is needed as libfaac-dev comes from multiverse, according to:
|
||||
# http://superuser.com/questions/467774/how-to-install-libfaac-dev
|
||||
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse\n\
|
||||
deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse\n\
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse\n\
|
||||
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse\n"\
|
||||
>> /etc/apt/sources.list
|
||||
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
software-properties-common
|
||||
RUN add-apt-repository ppa:george-edison55/cmake-3.x
|
||||
RUN apt-get update -qq
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
curl \
|
||||
cmake \
|
||||
wget \
|
||||
unzip \
|
||||
libopencv-dev \
|
||||
build-essential \
|
||||
git \
|
||||
libgtk2.0-dev \
|
||||
pkg-config \
|
||||
python-dev \
|
||||
python-numpy \
|
||||
libdc1394-22 \
|
||||
libdc1394-22-dev \
|
||||
libjpeg-dev \
|
||||
libpng12-dev \
|
||||
libtiff4-dev \
|
||||
libjasper-dev \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libswscale-dev \
|
||||
libxine-dev \
|
||||
libgstreamer0.10-dev \
|
||||
libgstreamer-plugins-base0.10-dev \
|
||||
libv4l-dev \
|
||||
libtbb-dev \
|
||||
libqt4-dev \
|
||||
libfaac-dev \
|
||||
libmp3lame-dev \
|
||||
libopencore-amrnb-dev \
|
||||
libopencore-amrwb-dev \
|
||||
libtheora-dev \
|
||||
libvorbis-dev \
|
||||
libxvidcore-dev \
|
||||
x264 \
|
||||
v4l-utils
|
||||
|
||||
RUN mkdir opencv
|
||||
WORKDIR opencv
|
||||
|
||||
RUN wget https://github.com/Itseez/opencv/archive/3.0.0.zip -O opencv-3.0.0.zip
|
||||
RUN unzip opencv-3.0.0.zip
|
||||
RUN mkdir opencv-3.0.0/build
|
||||
WORKDIR opencv-3.0.0/build
|
||||
|
||||
RUN cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_OPENGL=ON ..
|
||||
|
||||
RUN make -j $(nproc) && make install
|
||||
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf
|
||||
RUN ldconfig
|
||||
26
Makefile
26
Makefile
@ -14,29 +14,3 @@ travis-build:
|
||||
docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 .
|
||||
docker build -t peterbraden/node-opencv-ubuntu-14-04 -f test/Dockerfile-ubuntu-14-04 .
|
||||
.PHONY: travis-build
|
||||
|
||||
# The location of the `node-pre-gyp` module builder. Try and get a globally
|
||||
# installed version, falling back to a local install.
|
||||
NODE_PRE_GYP = $(shell which node-pre-gyp)
|
||||
ifeq ($(NODE_GYP),)
|
||||
NODE_PRE_GYP = ./node_modules/.bin/node-pre-gyp
|
||||
endif
|
||||
|
||||
NODE := $(shell which node)
|
||||
test_deps = build \
|
||||
./test/*.js \
|
||||
./lib/*.js \
|
||||
$(NODE)
|
||||
|
||||
build: build/Debug/opencv.node
|
||||
build/Debug/opencv.node:
|
||||
$(NODE_PRE_GYP) --verbose --debug rebuild
|
||||
|
||||
$(NODE_PRE_GYP):
|
||||
npm install node-pre-gyp
|
||||
|
||||
# Clean up any generated files
|
||||
clean: $(NODE_PRE_GYP)
|
||||
$(NODE_PRE_GYP) clean
|
||||
rm -rf coverage
|
||||
rm -rf build
|
||||
|
||||
@ -12,9 +12,6 @@
|
||||
"glob": "^5.0.3",
|
||||
"request": "^2.44.0"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"node-pre-gyp"
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "node-gyp build",
|
||||
|
||||
31
vagrant/Vagrantfile
vendored
31
vagrant/Vagrantfile
vendored
@ -1,31 +0,0 @@
|
||||
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
|
||||
@ -1,13 +0,0 @@
|
||||
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
|
||||
su vagrant
|
||||
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.27.1/install.sh | bash
|
||||
nvm install v0.10
|
||||
nvm install v0.12
|
||||
nvm install v4.1
|
||||
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
#!/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")
|
||||
|
||||
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"
|
||||
@ -1,26 +0,0 @@
|
||||
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/
|
||||
Loading…
x
Reference in New Issue
Block a user