mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +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
|
## v1.14.0-rc.3
|
||||||
* Added support for generating OCI hook JSON file to `nvidia-ctk runtime configure` command.
|
* 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
|
## v1.14.0-rc.2
|
||||||
|
|
||||||
|
@ -44,12 +44,6 @@ ARG GIT_COMMIT
|
|||||||
ENV GIT_COMMIT ${GIT_COMMIT}
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
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/..
|
WORKDIR $DIST_DIR/..
|
||||||
COPY packaging/rpm .
|
COPY packaging/rpm .
|
||||||
|
|
||||||
|
@ -62,12 +62,6 @@ ARG GIT_COMMIT
|
|||||||
ENV GIT_COMMIT ${GIT_COMMIT}
|
ENV GIT_COMMIT ${GIT_COMMIT}
|
||||||
RUN make PREFIX=${DIST_DIR} cmds
|
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/..
|
WORKDIR $DIST_DIR/..
|
||||||
COPY packaging/rpm .
|
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
|
Source0: nvidia-container-runtime-hook
|
||||||
Source1: nvidia-ctk
|
Source1: nvidia-ctk
|
||||||
Source2: oci-nvidia-hook
|
Source2: LICENSE
|
||||||
Source3: oci-nvidia-hook.json
|
Source3: nvidia-container-runtime
|
||||||
Source4: LICENSE
|
Source4: nvidia-container-runtime.cdi
|
||||||
Source5: nvidia-container-runtime
|
Source5: nvidia-container-runtime.legacy
|
||||||
Source6: nvidia-container-runtime.cdi
|
|
||||||
Source7: nvidia-container-runtime.legacy
|
|
||||||
|
|
||||||
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
|
Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook <= 1.4.0-2
|
||||||
Provides: nvidia-container-runtime
|
Provides: nvidia-container-runtime
|
||||||
@ -36,7 +34,7 @@ Requires: libseccomp
|
|||||||
Provides tools and utilities to enable GPU support in containers.
|
Provides tools and utilities to enable GPU support in containers.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} .
|
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
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-container-runtime.legacy
|
||||||
install -m 755 -t %{buildroot}%{_bindir} nvidia-ctk
|
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
|
%post
|
||||||
if [ $1 -gt 1 ]; then # only on package upgrade
|
if [ $1 -gt 1 ]; then # only on package upgrade
|
||||||
mkdir -p %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
mkdir -p %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
||||||
@ -77,8 +69,6 @@ fi
|
|||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_bindir}/nvidia-container-runtime-hook
|
%{_bindir}/nvidia-container-runtime-hook
|
||||||
/usr/libexec/oci/hooks.d/oci-nvidia-hook
|
|
||||||
/usr/share/containers/oci/hooks.d/oci-nvidia-hook.json
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
# As of 1.10.0-1 we generate the release information automatically
|
# As of 1.10.0-1 we generate the release information automatically
|
||||||
|
Loading…
Reference in New Issue
Block a user