-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (47 loc) · 1.85 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
#
# Ubuntu Dockerfile
#
# https://github.com/dockerfile/ubuntu
#
# Pull base image.
FROM ubuntu:14.04
# Install stuff
RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get install -y build-essential
RUN apt-get install -y software-properties-common
RUN apt-get install -y byobu curl git htop man unzip vim wget
RUN wget -O- http://neuro.debian.net/lists/trusty.de-m.full | tee /etc/apt/sources.list.d/neurodebian.sources.list
RUN apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9
RUN apt-get install -y gcc make cmake pkg-config python python-dev python-pip python-virtualenv libopencv-dev
RUN apt-get install -y libopenblas-dev python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose python-opencv
RUN apt-get install -y libfreetype6-dev libpng-dev
RUN apt-get install -y imagemagick graphicsmagick
RUN rm -rf /var/lib/apt/lists/*
# pip requirements
RUN pip install cv2
RUN pip install docopt
# Install Node.js
RUN wget -qO- https://deb.nodesource.com/setup_4.x | sudo bash -
RUN apt-get install -y nodejs
ADD . /app
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /app
# Install app dependencies
RUN cd /app && npm install
# Note: ln -s /dev/null /dev/raw1394 is to prevent error on python's
# cv2 during import: "libdc1394 error: Failed to initialize libdc1394"
# So, if you want to run another command, just update your CMD to start
# with this script, followed by whatever you want. (Not cute, but works)
RUN ln /dev/null /dev/raw1394
RUN sh -c 'ln -s /dev/null /dev/raw1394'; bash
# Link the sails binary to be able to use Sails CLI
RUN ln -s /app/node_modules/sails/bin/sails.js /bin/sails
# Expose Sails port
EXPOSE 1337
# Bring up sails app
RUN npm install
CMD ["/app/node_modules/sails/bin/sails.js", "lift"]