Change build system
This commit is contained in:
parent
dfd67cb1f6
commit
3ce22b6416
2 changed files with 22 additions and 37 deletions
|
@ -101,16 +101,16 @@ HASS_GIT=$WORKSPACE/homeassistant
|
||||||
# generate base image
|
# generate base image
|
||||||
case $MACHINE in
|
case $MACHINE in
|
||||||
"raspberrypi1")
|
"raspberrypi1")
|
||||||
BASE_IMAGE="resin\/raspberry-pi-alpine-python:3.6"
|
BASE_IMAGE="resin\/raspberry-pi-alpine:3.5"
|
||||||
;;
|
;;
|
||||||
"raspberrypi2")
|
"raspberrypi2")
|
||||||
BASE_IMAGE="resin\/raspberry-pi2-alpine-python:3.6"
|
BASE_IMAGE="resin\/raspberry-pi2-alpine:3.5"
|
||||||
;;
|
;;
|
||||||
"raspberrypi3")
|
"raspberrypi3")
|
||||||
BASE_IMAGE="resin\/raspberry-pi3-alpine-python:3.6"
|
BASE_IMAGE="resin\/raspberry-pi3-alpine:3.5"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
BASE_IMAGE="resin\/${MACHINE}-alpine-python:3.6"
|
BASE_IMAGE="resin\/${MACHINE}-alpine:3.5"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -5,18 +5,31 @@ ENV LANG C.UTF-8
|
||||||
|
|
||||||
# install core & build packages
|
# install core & build packages
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
libuv \
|
libuv \
|
||||||
|
musl-dev \
|
||||||
git \
|
git \
|
||||||
linux-headers \
|
linux-headers \
|
||||||
eudev-dev \
|
eudev-dev \
|
||||||
libusb-dev \
|
libusb-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
|
libjpeg-turbo-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
jpeg-dev \
|
||||||
|
freetype-dev \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
libtool \
|
libtool \
|
||||||
cmake \
|
cmake \
|
||||||
|
make \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
ncurses-dev \
|
ncurses-dev \
|
||||||
bison \
|
bison \
|
||||||
|
yaml \
|
||||||
flex
|
flex
|
||||||
|
|
||||||
# install component packages
|
# install component packages
|
||||||
|
@ -25,6 +38,9 @@ RUN apk --no-cache add \
|
||||||
nmap \
|
nmap \
|
||||||
libcec \
|
libcec \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
mariadb-dev \
|
||||||
|
postgresql-dev \
|
||||||
|
boost-python3 \
|
||||||
openssh-client
|
openssh-client
|
||||||
|
|
||||||
####
|
####
|
||||||
|
@ -52,16 +68,6 @@ RUN apk --no-cache add lapack-dev gfortran \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& rm -rf /usr/src/opencv
|
&& rm -rf /usr/src/opencv
|
||||||
|
|
||||||
# Boost & python (Dlib)
|
|
||||||
RUN git clone --depth 1 --recursive -b boost-1.64.0 https://github.com/boostorg/boost \
|
|
||||||
&& cd boost \
|
|
||||||
&& ln -s /usr/local/include/python3.6m /usr/local/include/python3.6 \
|
|
||||||
&& ./bootstrap.sh --with-libraries=python --with-python=/usr/local/bin/python3.6 \
|
|
||||||
&& ./b2 headers \
|
|
||||||
&& ./b2 \
|
|
||||||
&& ./b2 install \
|
|
||||||
&& rm -rf /usr/src/boost
|
|
||||||
|
|
||||||
# OpenAlpr
|
# OpenAlpr
|
||||||
RUN apk --no-cache add tesseract-ocr-dev \
|
RUN apk --no-cache add tesseract-ocr-dev \
|
||||||
&& git clone --depth 1 -b REL_1_2_0 https://github.com/log4cplus/log4cplus \
|
&& git clone --depth 1 -b REL_1_2_0 https://github.com/log4cplus/log4cplus \
|
||||||
|
@ -94,33 +100,12 @@ RUN git clone --depth 1 --recursive -b dtls https://github.com/home-assistant/li
|
||||||
&& make install \
|
&& make install \
|
||||||
&& rm -rf /usr/src/libcoap
|
&& rm -rf /usr/src/libcoap
|
||||||
|
|
||||||
# mariadb/mysql - until it support libressl
|
|
||||||
RUN git clone --depth 1 -b mariadb-10.1.23 https://github.com/MariaDB/server mariadb \
|
|
||||||
&& cd mariadb \
|
|
||||||
&& mkdir -p build \
|
|
||||||
&& cd build \
|
|
||||||
&& cmake ../ -DCMAKE_BUILD_TYPE=MinSizeRel -DWITHOUT_TOKUDB=1 -DWITHOUT_SERVER=yes -DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
||||||
&& make \
|
|
||||||
&& make install \
|
|
||||||
&& pip3 install --no-cache-dir mysqlclient \
|
|
||||||
&& rm -rf /usr/src/mariadb
|
|
||||||
|
|
||||||
# postgresql - until it support libressl
|
|
||||||
RUN git clone --depth 1 -b REL9_6_3 https://github.com/postgres/postgres \
|
|
||||||
&& cd postgres \
|
|
||||||
&& ./configure --prefix /usr/local --with-openssl \
|
|
||||||
&& make \
|
|
||||||
&& make -C src/bin install \
|
|
||||||
&& make -C src/include install \
|
|
||||||
&& make -C src/interfaces install \
|
|
||||||
&& pip install --no-cache-dir psycopg2 \
|
|
||||||
&& rm -rf /usr/src/postgres
|
|
||||||
|
|
||||||
####
|
####
|
||||||
## install pip module for component
|
## install pip module for component
|
||||||
COPY homeassistant/ homeassistant
|
COPY homeassistant/ homeassistant
|
||||||
RUN sed -i "s/# face_recognition/face_recognition/g" homeassistant/requirements_all.txt \
|
RUN sed -i "s/# face_recognition/face_recognition/g" homeassistant/requirements_all.txt \
|
||||||
&& pip3 install --no-cache-dir -r homeassistant/requirements_all.txt \
|
&& pip3 install --no-cache-dir -r homeassistant/requirements_all.txt \
|
||||||
|
&& pip3 install --no-cache-dir mysqlclient psycopg2 \
|
||||||
&& pip3 install --no-cache-dir cchardet uvloop \
|
&& pip3 install --no-cache-dir cchardet uvloop \
|
||||||
&& pip3 install --no-cache-dir /usr/src/homeassistant \
|
&& pip3 install --no-cache-dir /usr/src/homeassistant \
|
||||||
&& rm -r homeassistant
|
&& rm -r homeassistant
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue