Get python-openzwave working in Docker
parent
24d9856ae6
commit
6011cee490
20
Dockerfile
20
Dockerfile
|
@ -3,4 +3,24 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y cython3 libudev-dev python-sphinx python3-setuptools mercurial && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||||
|
pip3 install cython && \
|
||||||
|
cd .. && \
|
||||||
|
git clone https://github.com/Artanis/louie.git && \
|
||||||
|
cd louie && \
|
||||||
|
python setup.py install && \
|
||||||
|
cd .. && \
|
||||||
|
hg clone https://code.google.com/p/python-openzwave/ && \
|
||||||
|
cd python-openzwave && \
|
||||||
|
./update.sh && \
|
||||||
|
sed -i '253s/.*//' openzwave/cpp/src/value_classes/ValueID.h && \
|
||||||
|
2to3 --no-diffs -w -n api examples && \
|
||||||
|
./compile.sh && \
|
||||||
|
./install.sh
|
||||||
|
|
||||||
|
# L18 sed is to apply a patch to make openzwave compile
|
||||||
|
# L19 2to3 to have the api code work in Python 3
|
||||||
|
|
||||||
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
|
||||||
|
|
|
@ -8,14 +8,18 @@ fi
|
||||||
|
|
||||||
docker build -t home-assistant-dev .
|
docker build -t home-assistant-dev .
|
||||||
|
|
||||||
|
# TODO set device via command line, remove /bin/bash
|
||||||
|
|
||||||
if [ $# -gt 0 ]
|
if [ $# -gt 0 ]
|
||||||
then
|
then
|
||||||
docker run \
|
docker run \
|
||||||
--net=host \
|
--net=host \
|
||||||
-e "TZ=$1" \
|
-e "TZ=$1" \
|
||||||
|
--device=/dev/bus/usb/002:/usbstick:rwm \
|
||||||
-v `pwd`:/usr/src/app \
|
-v `pwd`:/usr/src/app \
|
||||||
-v `pwd`/config:/config \
|
-v `pwd`/config:/config \
|
||||||
-t -i home-assistant-dev
|
-t -i home-assistant-dev \
|
||||||
|
/bin/bash
|
||||||
|
|
||||||
else
|
else
|
||||||
docker run \
|
docker run \
|
||||||
|
|
Loading…
Reference in New Issue