mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
fix quotes for kernel mod
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
15d6c5edef
commit
3e32c7e421
@ -141,7 +141,7 @@ func (w *wrapper) Install(destDir string) error {
|
|||||||
func (w *wrapper) render() (io.Reader, error) {
|
func (w *wrapper) render() (io.Reader, error) {
|
||||||
wrapperTemplate := `#! /bin/sh
|
wrapperTemplate := `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
|
|||||||
@ -36,7 +36,7 @@ func TestWrapperRender(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expected: `#! /bin/sh
|
expected: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -55,7 +55,7 @@ fi
|
|||||||
},
|
},
|
||||||
expected: `#! /bin/sh
|
expected: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -73,7 +73,7 @@ PATH=/foo/bar/baz \
|
|||||||
},
|
},
|
||||||
expected: `#! /bin/sh
|
expected: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
|
|||||||
@ -167,7 +167,7 @@ func TestToolkitInstaller(t *testing.T) {
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -183,7 +183,7 @@ XDG_CONFIG_HOME=/foo/bar/baz/.config \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -199,7 +199,7 @@ XDG_CONFIG_HOME=/foo/bar/baz/.config \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -215,7 +215,7 @@ XDG_CONFIG_HOME=/foo/bar/baz/.config \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -230,7 +230,7 @@ PATH=/foo/bar/baz:$PATH \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -245,7 +245,7 @@ PATH=/foo/bar/baz:$PATH \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
@ -261,7 +261,7 @@ PATH=/foo/bar/baz:$PATH \
|
|||||||
mode: 0777,
|
mode: 0777,
|
||||||
wrapper: `#! /bin/sh
|
wrapper: `#! /bin/sh
|
||||||
|
|
||||||
cat /proc/modules | grep -e \"^nvidia \" >/dev/null 2>&1
|
cat /proc/modules | grep -e "^nvidia " >/dev/null 2>&1
|
||||||
if [ "${?}" != "0" ]; then
|
if [ "${?}" != "0" ]; then
|
||||||
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
echo "nvidia driver modules are not yet loaded, invoking runc directly"
|
||||||
exec runc "$@"
|
exec runc "$@"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user