Skip to content

Commit

Permalink
datadog-agent-nvml: build with python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: James Rawlings <[email protected]>
  • Loading branch information
rawlingsj committed Dec 18, 2024
1 parent 7149b0e commit 2f7f2a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions datadog-agent-nvml.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: datadog-agent-nvml
version: 1.0.9
epoch: 3
epoch: 4
description: "Checks NVIDIA Management Library (NVML) exposed metrics through the Datadog Agent and can correlate them with the exposed Kubernetes devices"
copyright:
- license: Apache-2.0
Expand All @@ -18,14 +18,15 @@ environment:
- busybox
- datadog-agent
- datadog-agent-core-integrations
- python-${{vars.python_version}}-dev # strictly requires python3.11
- python-${{vars.python_version}}-dev
- py${{vars.python_version}}-grpcio
- rsync

vars:
dd_conf: /etc/datadog-agent/conf.d
dd_home: / # agent being run by root expects /.
dd_shared: /opt/datadog-agent/embedded
python_version: "3.11"
python_version: "3.12"

pipeline:
# This integration wheel comes from the integrations-extras repository
Expand All @@ -35,6 +36,11 @@ pipeline:
tag: nvml-${{package.version}}
expected-commit: d38c5cdb4ab4d07f4432afb25e0ccd70341efb51

- runs: |
# use system python grpcio to avoid compiling it
# this makes the build use a system grpcio package which is greater than or equal to the one in the requirements.in
sed -i 's/grpcio==\(.*\)/grpcio>=\1/' ./nvml/requirements.in
- runs: |
# Create and activate a virtual environment.
python -m venv .venv
Expand Down
4 changes: 2 additions & 2 deletions datadog-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ environment:
- procps-dev
- py${{vars.py-version}}-pip
- py${{vars.py-version}}-semver
- python-${{vars.py-version}}-dev # strictly requires python3.11
- python-${{vars.py-version}}-dev
- systemd-dev
- util-linux-misc # unshare
- wget # Required for downloading clang-12 and kernel headers from debian
Expand All @@ -80,7 +80,7 @@ environment:
# -Os optimizes the code for size and add the directory to rtlinkers includes
CGO_CFLAGS: "-Os -I/usr/include/"
# Pass options to the linker.
CGO_LDFLAGS: "-L/usr/lib"
CGO_LDFLAGS: "-L/usr/lib/"
# disables generation of debugging information
# omits the symbol table and debug information, further reducing the size of the binary.
GOFLAGS: "-ldflags=-w -ldflags=-s"
Expand Down

0 comments on commit 2f7f2a3

Please sign in to comment.