-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Showing
10 changed files
with
72 additions
and
58 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 |
---|---|---|
|
@@ -91,7 +91,7 @@ jobs: | |
name: Build and push mjpeg | ||
uses: docker/[email protected] | ||
with: | ||
file: Dockerfile | ||
file: Dockerfile-mjpeg | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta_mjpeg.outputs.tags }} | ||
labels: ${{ steps.meta_mjpeg.outputs.labels }} | ||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM python:3.12.7-bookworm | ||
|
||
RUN apt update \ | ||
&& apt install -y \ | ||
ffmpeg x264 libx264-dev libuv1 \ | ||
libwebp-dev libtiff5-dev libjpeg*-turbo libjpeg*-turbo-dev libopenjp2-7-dev \ | ||
zlib1g-dev libfreetype6-dev liblcms2-dev \ | ||
build-essential python3-dev libdebuginfod-dev libunwind-dev liblz4-dev \ | ||
&& apt clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
WORKDIR /opt | ||
|
||
RUN groupadd moonraker-telegram-bot --gid 1000 \ | ||
&& useradd moonraker-telegram-bot --uid 1000 --gid moonraker-telegram-bot \ | ||
&& mkdir -p printer_data/logs printer_data/config timelapse timelapse_finished \ | ||
&& chown -R moonraker-telegram-bot:moonraker-telegram-bot /opt/* | ||
|
||
COPY --chown=moonraker-telegram-bot:moonraker-telegram-bot . ./moonraker-telegram-bot | ||
RUN pip3 install --no-cache-dir -r moonraker-telegram-bot/scripts/requirements.docker.opencv.txt | ||
|
||
RUN pip3 install --no-cache-dir memray==1.14.0 | ||
RUN pip3 install --no-cache-dir memory-profiler | ||
|
||
USER moonraker-telegram-bot | ||
VOLUME [ "/opt/printer_data/logs", "/opt/printer_data/config", "/opt/timelapse","/opt/timelapse_finished"] | ||
# ENTRYPOINT ["python3", "-m", "memray", "run", "--native", "--trace-python-allocators", "moonraker-telegram-bot/bot/main.py"] | ||
ENTRYPOINT ["python3", "moonraker-telegram-bot/bot/main.py"] | ||
CMD ["-c", "/opt/printer_data/config/telegram.conf", "-l", "/opt/printer_data/logs"] |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.9" | ||
services: | ||
moonraker-telegram-bot: | ||
platform: linux/arm64 | ||
build: | ||
dockerfile: Dockerfile | ||
context: . | ||
restart: unless-stopped | ||
volumes: | ||
- ./docker_data/timelapse:/opt/timelapse | ||
- ./docker_data/timelapse_finished:/opt/timelapse_finished | ||
- ./docker_data/log:/opt/printer_data/logs | ||
- ./docker_data/config:/opt/printer_data/config |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements.txt | ||
numpy~=1.26.4 |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements.txt | ||
opencv-python~=4.10.0.84 |
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