-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Dockerfile-dev
30 lines (23 loc) · 1.31 KB
/
Dockerfile-dev
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
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"]