-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildDockerfile
62 lines (52 loc) · 2 KB
/
BuildDockerfile
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
FROM ubuntu:20.04
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata \
&& DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& :
RUN apt-get install -y build-essential python3.9 python3-pip
RUN pip3 -q install pip --upgrade
RUN pip install --no-cache notebook jupyterlab ipykernel
RUN apt-get install -y git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
USER ${NB_USER}
WORKDIR ${HOME}
RUN mkdir devel
WORKDIR devel
RUN echo hello
RUN git clone -b python/persistent-storage --depth 1 https://github.com/mrjerryjohns/connectedhomeip.git
WORKDIR connectedhomeip
RUN git fetch
RUN ["/bin/bash", "-c", "source scripts/activate.sh"]
RUN ./scripts/build_python.sh --chip_detail_logging true
RUN ["/bin/bash", "-c", "source ./out/python_env/bin/activate && pip install ipykernel"]
RUN scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug 'chip_config_network_layer_ble=false'
USER root
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
WORKDIR ${HOME}/devel/connectedhomeip
RUN mv out ../
WORKDIR ../
RUN rm -rf connectedhomeip/*
RUN rm -rf connectedhomeip/.[!.]*
RUN mv out connectedhomeip
WORKDIR connectedhomeip
WORKDIR out/debug
RUN mv chip-all-clusters-app ../
WORKDIR ..
RUN rm -rf debug/*
RUN rm -rf debug/.[!.]*
RUN mv chip-all-clusters-app debug
WORKDIR ..
RUN ["/bin/bash", "-c", "source ./out/python_env/bin/activate && python -m ipykernel install --name=matter-env"]
RUN pip install --no-cache jupyterlab-system-monitor
USER ${NB_USER}
COPY . ${HOME}/devel/connectedhomeip