mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 21:14:00 +00:00
Remove installation of oci-nvidia-hook files in RPM packages
This change removes installation of the oci-nvidia-hook files. These files conflict with CDI use in runtimes that support it. The use of the hook should be considered deprecated on these platforms. If a hook is required, the nvidia-ctk runtime configure --config-mode=oci-hook command should be used to create the hook file(s). Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
f6a4986c15
commit
65f6f46846
@ -2,6 +2,7 @@
|
||||
|
||||
## v1.14.0-rc.3
|
||||
* Added support for generating OCI hook JSON file to `nvidia-ctk runtime configure` command.
|
||||
* Remove installation of OCI hook JSON from RPM package.
|
||||
|
||||
## v1.14.0-rc.2
|
||||
|
||||
|
@ -44,12 +44,6 @@ ARG GIT_COMMIT
|
||||
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
||||
COPY oci-nvidia-hook $DIST_DIR/oci-nvidia-hook
|
||||
|
||||
# Hook for libpod/CRI-O: https://github.com/containers/libpod/blob/v0.8.5/pkg/hooks/docs/oci-hooks.5.md
|
||||
COPY oci-nvidia-hook.json $DIST_DIR/oci-nvidia-hook.json
|
||||
|
||||
WORKDIR $DIST_DIR/..
|
||||
COPY packaging/rpm .
|
||||
|
||||
|
@ -62,12 +62,6 @@ ARG GIT_COMMIT
|
||||
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
||||
COPY oci-nvidia-hook $DIST_DIR/oci-nvidia-hook
|
||||
|
||||
# Hook for libpod/CRI-O: https://github.com/containers/libpod/blob/v0.8.5/pkg/hooks/docs/oci-hooks.5.md
|
||||
COPY oci-nvidia-hook.json $DIST_DIR/oci-nvidia-hook.json
|
||||
|
||||
WORKDIR $DIST_DIR/..
|
||||
COPY packaging/rpm .
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" exec /usr/bin/nvidia-container-runtime-hook "$@"
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"hook": {
|
||||
"path": "/usr/bin/nvidia-container-runtime-hook",
|
||||
"args": ["nvidia-container-runtime-hook", "prestart"],
|
||||
"env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
]
|
||||
},
|
||||
"when": {
|
||||
"always": true,
|
||||
"commands": [".*"]
|
||||
},
|
||||
"stages": ["prestart"]
|
||||
}
|
@ -12,12 +12,10 @@ License: Apache-2.0
|
||||
|
||||
Source0: nvidia-container-runtime-hook
|
||||
Source1: nvidia-ctk
|
||||
Source2: oci-nvidia-hook
|
||||
Source3: oci-nvidia-hook.json
|
||||
Source4: LICENSE
|
||||
Source5: nvidia-container-runtime
|
||||
Source6: nvidia-container-runtime.cdi
|
||||
Source7: nvidia-container-runtime.legacy
|
||||
Source2: LICENSE
|
||||
Source3: nvidia-container-runtime
|
||||
Source4: nvidia-container-runtime.cdi
|
||||
Source5: nvidia-container-runtime.legacy
|
||||
|
||||
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
|
||||
Provides: nvidia-container-runtime
|
||||
@ -36,7 +34,7 @@ Requires: libseccomp
|
||||
Provides tools and utilities to enable GPU support in containers.
|
||||
|
||||
%prep
|
||||
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} .
|
||||
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
@ -46,12 +44,6 @@ install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime.cdi
|
||||
install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime.legacy
|
||||
install -m 755 -t %{buildroot}%{_bindir} nvidia-ctk
|
||||
|
||||
mkdir -p %{buildroot}/usr/libexec/oci/hooks.d
|
||||
install -m 755 -t %{buildroot}/usr/libexec/oci/hooks.d oci-nvidia-hook
|
||||
|
||||
mkdir -p %{buildroot}/usr/share/containers/oci/hooks.d
|
||||
install -m 644 -t %{buildroot}/usr/share/containers/oci/hooks.d oci-nvidia-hook.json
|
||||
|
||||
%post
|
||||
if [ $1 -gt 1 ]; then # only on package upgrade
|
||||
mkdir -p %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
||||
@ -77,8 +69,6 @@ fi
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_bindir}/nvidia-container-runtime-hook
|
||||
/usr/libexec/oci/hooks.d/oci-nvidia-hook
|
||||
/usr/share/containers/oci/hooks.d/oci-nvidia-hook.json
|
||||
|
||||
%changelog
|
||||
# As of 1.10.0-1 we generate the release information automatically
|
||||
|
Loading…
Reference in New Issue
Block a user