forked from NPSVisionLab/vatic-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (57 loc) · 2.8 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM ubuntu:trusty
RUN apt-get update && \
apt-get install -y wget git python-setuptools python-dev libavcodec-dev libavformat-dev libswscale-dev libjpeg62 libjpeg62-dev libfreetype6 libfreetype6-dev apache2 libapache2-mod-wsgi mysql-server-5.5 mysql-client-5.5 libmysqlclient-dev gfortran python-pip php5-cgi libapache2-mod-php5 && \
# the add-apt-repository command isn't included in ubuntu. we'll get it here.
apt-get install -y software-properties-common python-software-properties && \
add-apt-repository ppa:mc3man/trusty-media -y && \
apt-get update && \
apt-get install -y ffmpeg gstreamer0.10-ffmpeg
RUN sudo pip install SQLAlchemy==1.0.0 && \
sudo pip install wsgilog==0.3 && \
sudo pip install cython==0.20 && \
sudo pip install mysql-python==1.2.5 && \
sudo pip install munkres==1.0.7 && \
sudo pip install parsedatetime==1.4 && \
sudo pip install argparse && \
sudo pip install numpy==1.9.2 && \
sudo pip install Pillow
RUN cd /root && \
git clone https://github.com/cvondrick/turkic.git && \
git clone https://github.com/cvondrick/pyvision.git && \
git clone https://github.com/cvondrick/vatic.git && \
cd /root/turkic && \
sudo python setup.py install && \
cd /root/pyvision && \
sudo python setup.py install
COPY config/000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY config/apache2.conf /etc/apache2/apache2.conf
RUN sudo cp /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled && \
sudo apache2ctl graceful
COPY config/config.py /root/vatic/config.py
# We need to adjust some of these guys's import statements...
RUN sed -i'' "s/import Image/from PIL import Image/" \
/usr/local/lib/python2.7/dist-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/frameiterators.py \
/usr/local/lib/python2.7/dist-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/ffmpeg.py \
/usr/local/lib/python2.7/dist-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/visualize.py \
/root/vatic/models.py \
/root/vatic/cli.py \
/usr/local/lib/python2.7/dist-packages/pyvision-0.3.1-py2.7-linux-x86_64.egg/vision/pascal.py
RUN sudo /etc/init.d/mysql start && \
cd /root/vatic && \
mysql -u root --execute="CREATE DATABASE vatic;" && \
turkic setup --database && \
turkic setup --public-symlink
RUN sudo chown -R 755 /root/vatic/public && \
find /root -type d -exec chmod 775 {} \; && \
sudo chmod -R 775 /var/www && \
apt-get install -y links && \
sudo apache2ctl restart
# Debug tools
RUN apt-get install -y nano w3m man
COPY ascripts /root/vatic/ascripts
COPY scripts /root/vatic
# moved to the end to make troubleshooting quicker
# Prepare workspace for use
EXPOSE 80 443
# VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"]
# ENTRYPOINT ["/root/vatic/startup.sh"]