Skip to content

Commit

Permalink
Merge pull request #123 from KeithMnemonic/add_nvidia_gpu_reset_targe…
Browse files Browse the repository at this point in the history
…t_to_pkg_build_files

Update nvidia-gpu-reset.target setup
  • Loading branch information
klueska authored Sep 5, 2024
2 parents e906966 + c4615ad commit dec72fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deployments/systemd/nvidia-mig-manager.service
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Type=oneshot
ExecStart=-/bin/bash /etc/nvidia-mig-manager/service.sh

[Install]
WantedBy=nvidia-gpu-reset.target
WantedBy=multi-user.target nvidia-gpu-reset.target
1 change: 1 addition & 0 deletions deployments/systemd/packages/Dockerfile.tarball
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ COPY ./deployments/systemd/hooks.sh ${DESTDIR}
COPY ./deployments/systemd/hooks-default.yaml ${DESTDIR}
COPY ./deployments/systemd/hooks-minimal.yaml ${DESTDIR}
COPY ./deployments/systemd/nvidia-mig-manager.service ${DESTDIR}
COPY ./deployments/systemd/nvidia-gpu-reset.target ${DESTDIR}
COPY ./deployments/systemd/nvidia-mig-parted.sh ${DESTDIR}
COPY ./deployments/systemd/override.conf ${DESTDIR}
COPY ./deployments/systemd/service.sh ${DESTDIR}
Expand Down
2 changes: 2 additions & 0 deletions deployments/systemd/packages/debian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SOURCE7 = hooks.sh
SOURCE8 = hooks-default.yaml
SOURCE9 = hooks-minimal.yaml
SOURCE10 = config-default.yaml
SOURCE11 = nvidia-gpu-reset.target

build:

Expand All @@ -45,3 +46,4 @@ install:
install -m 644 -t $(DESTDIR)/etc/nvidia-mig-manager $(SOURCE8)
install -m 644 -t $(DESTDIR)/etc/nvidia-mig-manager $(SOURCE9)
install -m 644 -t $(DESTDIR)/etc/nvidia-mig-manager $(SOURCE10)
install -m 644 -t $(DESTDIR)/lib/systemd/system $(SOURCE11)
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Source7: hooks.sh
Source8: hooks-default.yaml
Source9: hooks-minimal.yaml
Source10: config-default.yaml
Source11: nvidia-gpu-reset.target

%description
The NVIDIA MIG Partition Editor allows administrators to declaratively define a
Expand All @@ -38,7 +39,7 @@ cp %{SOURCE0} %{SOURCE1} \
%{SOURCE4} %{SOURCE5} \
%{SOURCE6} %{SOURCE7} \
%{SOURCE8} %{SOURCE9} \
%{SOURCE10} \
%{SOURCE10} %{SOURCE11} \
.

%install
Expand All @@ -59,6 +60,7 @@ install -m 644 -t %{buildroot}/etc/nvidia-mig-manager %{SOURCE7}
install -m 644 -t %{buildroot}/etc/nvidia-mig-manager %{SOURCE8}
install -m 644 -t %{buildroot}/etc/nvidia-mig-manager %{SOURCE9}
install -m 644 -t %{buildroot}/etc/nvidia-mig-manager %{SOURCE10}
install -m 644 -t %{buildroot}/usr/lib/systemd/system %{SOURCE11}

%files
%license LICENSE
Expand All @@ -75,6 +77,7 @@ install -m 644 -t %{buildroot}/etc/nvidia-mig-manager %{SOURCE10}
%dir /etc/systemd/system/nvidia-mig-manager.service.d
%dir /etc/nvidia-mig-manager/
%dir /var/lib/nvidia-mig-manager
/usr/lib/systemd/system/nvidia-gpu-reset.target

%post
systemctl daemon-reload
Expand Down

0 comments on commit dec72fb

Please sign in to comment.