-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
914378d
commit 4152028
Showing
2 changed files
with
29 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
lib | ||
venv | ||
libs/rpi-rgb-led-matrix/fonts | ||
libs/rpi-rgb-led-matrix/images | ||
libs/rpi-rgb-led-matrix/bindings/python/build | ||
images/backgrounds/* | ||
images/weather/* |
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,9 +1,29 @@ | ||
FROM python:3.10 | ||
ARG base_image="python" | ||
ARG base_tag="3.10" | ||
ARG uid="1000" | ||
|
||
COPY . /app | ||
FROM ${base_image}:${base_tag} AS build | ||
ARG uid | ||
|
||
COPY ./pyproject.toml ./poetry.lock /app/ | ||
WORKDIR /app | ||
|
||
RUN python -m venv /venv && \ | ||
python -m pip install --upgrade pip poetry && \ | ||
poetry install | ||
/venv/bin/python -m pip install --upgrade pip poetry | ||
RUN . /venv/bin/activate && poetry install | ||
|
||
COPY . /app | ||
RUN . /venv/bin/activate && ls /app && cd /app/lib/rpi-rgb-led-matrix && make build-python | ||
|
||
RUN chown -R ${uid} /app | ||
|
||
FROM ${base_image}:${base_tag} AS runtime | ||
ARG uid | ||
|
||
COPY --from=build /venv /venv | ||
COPY --from=build /app /app | ||
|
||
WORKDIR /app | ||
USER ${uid} | ||
|
||
CMD ["/venv/bin/python", "-m", "wideboy"] |