2bcbdb8b2b29b653af780121e01cefb2a5f35407
[platform/core/ml/nnfw.git] / Dockerfile
1 FROM ubuntu:14.04
2
3 ARG HTTP_PROXY
4 ARG HTTPS_PROXY
5 ARG UBUNTU_MIRROR
6
7 RUN if [ -n "$HTTP_PROXY" ] ; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf ; fi
8 RUN if [ -n "$HTTPS_PROXY" ] ; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf ; fi
9 RUN if [ -n "$UBUNTU_MIRROR" ] ; then sed "s/archive.ubuntu.com/${UBUNTU_MIRROR}/g" -i /etc/apt/sources.list ; fi
10
11 RUN apt update
12
13 # Install 'add-apt-repository'
14 RUN apt-get install -y software-properties-common
15
16 # Add CMake 3.2 PPA
17 RUN add-apt-repository -y ppa:george-edison55/cmake-3.x
18 RUN apt update
19
20 # Install base dependencies
21 RUN apt install -y make cmake g++
22
23 # Install google test (source)
24 RUN apt install -y libgtest-dev
25
26 # Build and install google test static libraries
27 WORKDIR /root/gtest
28 RUN cmake /usr/src/gtest
29 RUN make
30 RUN mv *.a /usr/lib
31 WORKDIR /root
32 RUN rm -rf gtest
33
34 # Install protocol buffer
35 RUN apt install -y libprotobuf-dev protobuf-compiler
36
37 # Install HDF5 tools for testing
38 RUN apt install -y hdf5-tools
39
40 # Install extra dependencies
41 RUN apt install -y libgflags-dev # Caffe
42 RUN apt install -y libgoogle-glog-dev # Caffe
43 RUN apt install -y libhdf5-dev # Caffe, nnkit
44 RUN apt install -y libboost-system-dev # Caffe
45 RUN apt install -y libboost-filesystem-dev # Caffe
46 RUN apt install -y libboost-thread-dev # Caffe
47 RUN apt install -y libatlas-base-dev # Caffe
48
49 # Clean archives (to reduce image size)
50 RUN apt-get clean -y