Skip to content

Commit

Permalink
fix: switch to python debian slim base image
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Apr 13, 2024
1 parent 402415c commit 59a1689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/ubuntu:24.04
FROM docker.io/library/python:3.12-slim

ENV \
DEBCONF_NONINTERACTIVE_SEEN="true" \
Expand All @@ -23,10 +23,7 @@ RUN \
apt-get install --no-install-recommends -y \
catatonit \
intel-gpu-tools \
python3 \
python3-pip \
&& pip install --no-cache-dir -r requirements.txt \
&& apt-get remove -y python3-pip \
&& pip install --requirement requirements.txt \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get autoremove -y \
&& apt-get clean \
Expand All @@ -36,7 +33,7 @@ RUN \
/var/cache/apt/* \
/var/tmp/*

ENTRYPOINT ["/usr/bin/catatonit", "--", "/usr/bin/python3"]
ENTRYPOINT ["/usr/bin/catatonit", "--", "/usr/local/bin/python"]
CMD ["/app/intel-gpu-exporter.py"]

LABEL \
Expand Down
4 changes: 2 additions & 2 deletions intel-gpu-exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def update(data):
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
start_http_server(8080)

period = os.getenv("REFRESH_PERIOD_MS", 5000)
period = os.getenv("REFRESH_PERIOD_MS", 10000)

cmd = '/usr/bin/intel_gpu_top -J -s {}'.format(int(period))
cmd = 'intel_gpu_top -J -s {}'.format(int(period))
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)

logging.info('Started ' + cmd)
Expand Down

0 comments on commit 59a1689

Please sign in to comment.