You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
ARG GOLANG_VERSION
|
|
FROM golang:$GOLANG_VERSION AS builder
|
|
WORKDIR /go/src/github.com/NVIDIA/dcgm-exporter
|
|
|
|
COPY . .
|
|
|
|
RUN make binary check-format
|
|
|
|
FROM nvcr.io/nvidia/cuda:12.2.0-base-ubi8
|
|
LABEL io.k8s.display-name="NVIDIA DCGM Exporter"
|
|
|
|
ARG DCGM_VERSION
|
|
|
|
RUN dnf clean expire-cache && dnf install -y datacenter-gpu-manager-${DCGM_VERSION} libcap
|
|
|
|
COPY --from=builder /go/src/github.com/NVIDIA/dcgm-exporter/cmd/dcgm-exporter/dcgm-exporter /usr/bin/
|
|
COPY etc /etc/dcgm-exporter
|
|
|
|
ENV NVIDIA_VISIBLE_DEVICES=all
|
|
# disable all constraints on the configurations required by NVIDIA container toolkit
|
|
ENV NVIDIA_DISABLE_REQUIRE="true"
|
|
# Required for DCP metrics
|
|
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,compat32
|
|
|
|
ARG VERSION
|
|
|
|
LABEL io.k8s.display-name="NVIDIA DCGM Eporter"
|
|
LABEL name="NVIDIA DCGM Exporter"
|
|
LABEL vendor="NVIDIA"
|
|
LABEL version="${VERSION}"
|
|
LABEL release="N/A"
|
|
LABEL summary="Exports GPU Metrics to Prometheus"
|
|
LABEL description="See summary"
|
|
|
|
COPY ./LICENSE ./licenses/LICENSE
|
|
|
|
ENV NO_SETCAP=
|
|
COPY docker/dcgm-exporter-entrypoint.sh /usr/local/dcgm/dcgm-exporter-entrypoint.sh
|
|
RUN chmod +x /usr/local/dcgm/dcgm-exporter-entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/dcgm/dcgm-exporter-entrypoint.sh"]
|