The BlackScholes example runs, but docker throws nvidia-container-cli: initialization error

While reading CUDA on WSL :: CUDA Toolkit Documentation, an error occurred in the docker related part.

The BlackScholes example runs fine, but as soon as I use Docker, it doesn’t run.

DxDiag.txt (92.1 KB)

— System info —
CPU : AMD Ryzen 5 3600XT
GPU: GTX 750 Ti

Host OS: 10.0.21387 build 21387
Host Docker version: There was at the beginning of the installation, but after the docker example failed, the host docker was removed.

Guest OS: Ubuntu-20.04
Guest Docker version 20.10.6, build 370c289

— BlackScholes execution result —
[./BlackScholes] - Starting…
GPU Device 0: “Maxwell” with compute capability 5.0

Initializing data…
…allocating CPU memory for options.
…allocating GPU memory for options.
…generating input data in CPU mem.
…copying input data to GPU mem.
Data init done.

Executing Black-Scholes GPU kernel (512 iterations)…
Options count : 8000000
BlackScholesGPU() time : 1.119853 msec
Effective memory bandwidth: 71.437916 GB/s
Gigaoptions per second : 7.143792

BlackScholes, Throughput = 7.1438 GOptions/s, Time = 0.00112 s, Size = 8000000 options, NumDevsUsed = 1, Workgroup = 128

Reading back GPU results…
Checking the results…
…running CPU calculations.

Comparing the results…
L1 norm: 1.741792E-07
Max absolute error: 1.192093E-05

Shutting down…
…releasing GPU memory.
…releasing CPU memory.
Shutdown done.

[BlackScholes] - Test Summary

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

docker run --gpus all nbody -gpu -benchmark

docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: Running hook #0:: error running hook: exit status 1, stdout:, stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown. ERRO[0000] error waiting for container: context canceled

1 Like

I tried using the WSL2 feature of Docker Desktop, but it failed. But the WSL2 support was nice. Thank you