-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #595 from BrewBlox/develop
Edge release
- Loading branch information
Showing
149 changed files
with
7,798 additions
and
8,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,5 @@ eeprom.bin | |
|
||
# Build files | ||
firmware/ | ||
|
||
.appenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,63 @@ | ||
FROM python:3.9-bullseye as base | ||
FROM python:3.11-bookworm as base | ||
|
||
ENV PIP_EXTRA_INDEX_URL=https://www.piwheels.org/simple | ||
ENV PIP_FIND_LINKS=/wheeley | ||
ENV VENV=/app/.venv | ||
ENV PATH="$VENV/bin:$PATH" | ||
|
||
COPY ./dist /app/dist | ||
COPY ./firmware /app/firmware | ||
|
||
RUN set -ex \ | ||
&& mkdir /wheeley \ | ||
&& pip3 install --upgrade pip wheel setuptools \ | ||
&& pip3 wheel --wheel-dir=/wheeley -r /app/dist/requirements.txt \ | ||
&& pip3 wheel --wheel-dir=/wheeley /app/dist/*.tar.gz \ | ||
&& ARCH="$(dpkg --print-architecture)" \ | ||
&& if [ "${ARCH}" = "amd64" ]; then OTHER_SIM='brewblox-{arm32,arm64}.sim'; fi \ | ||
&& if [ "${ARCH}" = "armhf" ]; then OTHER_SIM='brewblox-{amd64,arm64}.sim'; fi \ | ||
&& if [ "${ARCH}" = "arm64" ]; then OTHER_SIM='brewblox-{amd64,arm32}.sim'; fi \ | ||
&& bash -c "rm /app/firmware/${OTHER_SIM}" \ | ||
&& rm /app/firmware/*.elf | ||
|
||
FROM python:3.9-slim-bullseye | ||
RUN <<EOF | ||
set -ex | ||
|
||
mkdir /wheeley | ||
python3 -m venv $VENV | ||
pip3 install --upgrade pip wheel setuptools | ||
pip3 wheel --wheel-dir=/wheeley -r /app/dist/requirements.txt | ||
pip3 wheel --wheel-dir=/wheeley /app/dist/*.tar.gz | ||
EOF | ||
|
||
RUN <<EOF bash | ||
set -ex | ||
|
||
cd /app/firmware | ||
ARCH="$(dpkg --print-architecture)" | ||
if [ "\${ARCH}" = "amd64" ]; then | ||
rm ./*.elf ./brewblox-{arm32,arm64}.sim | ||
elif [ "\${ARCH}" = "armhf" ]; then | ||
rm ./*.elf ./brewblox-{amd64,arm64}.sim | ||
elif [ "\${ARCH}" = "arm64" ]; then | ||
rm ./*.elf ./brewblox-{amd64,arm32}.sim | ||
fi | ||
EOF | ||
|
||
FROM python:3.11-slim-bookworm | ||
EXPOSE 5000 | ||
WORKDIR /app | ||
|
||
ARG service_info=UNKNOWN | ||
ENV SERVICE_INFO=${service_info} | ||
|
||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
socat \ | ||
usbutils \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ENV PIP_FIND_LINKS=/wheeley | ||
ENV VENV=/app/.venv | ||
ENV PATH="$VENV/bin:$PATH" | ||
|
||
COPY --from=base /wheeley /wheeley | ||
COPY --from=base /app/firmware /app/firmware | ||
COPY ./parse_appenv.py ./parse_appenv.py | ||
COPY ./entrypoint.sh ./entrypoint.sh | ||
|
||
RUN <<EOF | ||
set -ex | ||
|
||
apt-get update | ||
apt-get install -y --no-install-recommends \ | ||
socat \ | ||
usbutils | ||
rm -rf /var/cache/apt/archives /var/lib/apt/lists | ||
|
||
RUN set -ex \ | ||
&& pip3 install --no-index --find-links=/wheeley brewblox-devcon-spark \ | ||
&& pip3 freeze \ | ||
&& rm -rf /wheeley | ||
python3 -m venv $VENV | ||
pip3 install --no-index brewblox_devcon_spark | ||
pip3 freeze | ||
rm -rf /wheeley | ||
EOF | ||
|
||
ENTRYPOINT ["python3", "-m", "brewblox_devcon_spark"] | ||
ENTRYPOINT ["bash", "./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.