-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup_cloud_service-Dockerfile
39 lines (30 loc) · 1.38 KB
/
setup_cloud_service-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
FROM debian:bullseye-slim
ENV AWS_PAGER=""
## Install demo dependencies
RUN apt-get -y update && apt-get install -y \
curl unzip wget jq less uuid-runtime git
RUN git config --global user.email "you@example.com" && \
git config --global user.name "Your Name"
## Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" \
-o "awscliv2.zip" && \
unzip awscliv2.zip && ./aws/install && \
rm -rf /root/.aws/credentials awscliv2.zip aws
## Prepare Greengrass to execute on the target
COPY Docker-base-torizon/greengrass-bin greengrass-bin
RUN ./greengrass-bin/greengrass-bin_2.4.0.sh
WORKDIR /root
## Obtain demo files from NXP and apply patches to run on Maivin
COPY meta-aws-patches meta-aws-patches
RUN git clone -b aws-cloud-demo-video-kvs https://github.com/NXPmicro/meta-aws.git && \
cd meta-aws && git reset 6f0a533d2dfa9a9fc9d3bf6f9201c8b8a624f90e --hard && \
git am ../meta-aws-patches/*.patch && cd .. && \
cp -r meta-aws/recipes-devtools/amazon-sagemaker-neo/dlr-demo/* . && \
rm -rf meta-aws && rm -rf meta-aws-patches
ENTRYPOINT \
find . -type f -exec sed -i "s/us-east-2/$AWS_REGION/g" {} + && \
bash ./setup_cloud_service_and_device.sh && \
tar -czvf /deploy/greengrass-$PROJECT_NAME.tar.gz /greengrass && \
cp project_config.sh /deploy/ && \
tar -czvf /deploy/kvs-$PROJECT_NAME.tar.gz /kvs && \
cp /etc/default/kvs /deploy/kvs-settings