mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
Merge branch 'fix-containerd-integration-tests' into 'main'
Fix integration tests failing due to CDI spec generation See merge request nvidia/container-toolkit/container-toolkit!333
This commit is contained in:
commit
965d62f326
@ -50,7 +50,7 @@ META_TARGETS := packaging
|
|||||||
|
|
||||||
BUILD_TARGETS := $(patsubst %,build-%,$(DISTRIBUTIONS) $(META_TARGETS))
|
BUILD_TARGETS := $(patsubst %,build-%,$(DISTRIBUTIONS) $(META_TARGETS))
|
||||||
PUSH_TARGETS := $(patsubst %,push-%,$(DISTRIBUTIONS) $(META_TARGETS))
|
PUSH_TARGETS := $(patsubst %,push-%,$(DISTRIBUTIONS) $(META_TARGETS))
|
||||||
TEST_TARGETS := $(patsubst %,test-%, $(DISTRIBUTIONS))
|
TEST_TARGETS := $(patsubst %,test-%,$(DISTRIBUTIONS))
|
||||||
|
|
||||||
.PHONY: $(DISTRIBUTIONS) $(PUSH_TARGETS) $(BUILD_TARGETS) $(TEST_TARGETS)
|
.PHONY: $(DISTRIBUTIONS) $(PUSH_TARGETS) $(BUILD_TARGETS) $(TEST_TARGETS)
|
||||||
|
|
||||||
|
@ -52,8 +52,9 @@ testing::containerd::toolkit::run() {
|
|||||||
--volumes-from "${containerd_dind_ctr}" \
|
--volumes-from "${containerd_dind_ctr}" \
|
||||||
-v "${shared_dir}/etc/containerd/config_${version}.toml:${containerd_dind_containerd_dir}/containerd.toml" \
|
-v "${shared_dir}/etc/containerd/config_${version}.toml:${containerd_dind_containerd_dir}/containerd.toml" \
|
||||||
--pid "container:${containerd_dind_ctr}" \
|
--pid "container:${containerd_dind_ctr}" \
|
||||||
-e "RUNTIME=containerd" \
|
-e RUNTIME="containerd" \
|
||||||
-e "RUNTIME_ARGS=--config=${containerd_dind_containerd_dir}/containerd.toml --socket=${containerd_dind_containerd_dir}/containerd.sock" \
|
-e RUNTIME_ARGS="--config=${containerd_dind_containerd_dir}/containerd.toml --socket=${containerd_dind_containerd_dir}/containerd.sock" \
|
||||||
|
-e CDI_OUTPUT_DIR="" \
|
||||||
--name "${containerd_test_ctr}" \
|
--name "${containerd_test_ctr}" \
|
||||||
"${toolkit_container_image}" "/usr/local/nvidia" "--no-daemon"
|
"${toolkit_container_image}" "/usr/local/nvidia" "--no-daemon"
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ testing::docker::toolkit::run() {
|
|||||||
docker run -d --rm --privileged \
|
docker run -d --rm --privileged \
|
||||||
--volumes-from "${docker_dind_ctr}" \
|
--volumes-from "${docker_dind_ctr}" \
|
||||||
--pid "container:${docker_dind_ctr}" \
|
--pid "container:${docker_dind_ctr}" \
|
||||||
-e "RUNTIME_ARGS=--socket ${docker_dind_socket}" \
|
-e RUNTIME_ARGS="--socket ${docker_dind_socket}" \
|
||||||
|
-e CDI_OUTPUT_DIR="" \
|
||||||
--name "${docker_test_ctr}" \
|
--name "${docker_test_ctr}" \
|
||||||
"${toolkit_container_image}" "/usr/local/nvidia" "--no-daemon"
|
"${toolkit_container_image}" "/usr/local/nvidia" "--no-daemon"
|
||||||
|
|
||||||
|
@ -168,12 +168,14 @@ func main() {
|
|||||||
Usage: "the directory where the CDI output files are to be written. If this is set to '', no CDI specification is generated.",
|
Usage: "the directory where the CDI output files are to be written. If this is set to '', no CDI specification is generated.",
|
||||||
Value: "/var/run/cdi",
|
Value: "/var/run/cdi",
|
||||||
Destination: &opts.cdiOutputDir,
|
Destination: &opts.cdiOutputDir,
|
||||||
|
EnvVars: []string{"CDI_OUTPUT_DIR"},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "cdi-kind",
|
Name: "cdi-kind",
|
||||||
Usage: "the vendor string to use for the generated CDI specification",
|
Usage: "the vendor string to use for the generated CDI specification",
|
||||||
Value: "management.nvidia.com/gpu",
|
Value: "management.nvidia.com/gpu",
|
||||||
Destination: &opts.cdiKind,
|
Destination: &opts.cdiKind,
|
||||||
|
EnvVars: []string{"CDI_KIND"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user