diff --git a/Dockerfile b/Dockerfile index 911b409..61f8d44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/ubuntu:24.04 +FROM docker.io/library/python:3.12-slim ENV \ DEBCONF_NONINTERACTIVE_SEEN="true" \ @@ -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 \ @@ -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 \ diff --git a/intel-gpu-exporter.py b/intel-gpu-exporter.py index a062b20..6132233 100644 --- a/intel-gpu-exporter.py +++ b/intel-gpu-exporter.py @@ -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)