Open EntityinArray opened 7 months ago
@EntityinArray, starting the container with the --gpus
flag is exactly what is needed to expose the GPUs to the container.
Starting the container directly from the Docker Desktop GUI doesn't add this flag, so the container cannot access the GPU resources.
@EntityinArray, starting the container with the
--gpus
flag is exactly what is needed to expose the GPUs to the container. Starting the container directly from the Docker Desktop GUI doesn't add this flag, so the container cannot access the GPU resources.
Cool, how to add it in GUI?
@EntityinArray, starting the container with the
--gpus
flag is exactly what is needed to expose the GPUs to the container. Starting the container directly from the Docker Desktop GUI doesn't add this flag, so the container cannot access the GPU resources.Cool, how to add it in GUI?
did this ever get answered, or solved? I appear to have the same problem. 👍
edit: this is the most useful post I've found on this subject on the whole dear www
Currently, no. Looks like the only way to assign GPUs to a container is on the command line.
docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
docker run --gpus all your-container-name
cli? :]
ah. doh. I'll see if I can break everything by trying this out...not that I have a clue what I'm doing (arty type) big cheers for the post and response 🥇
Compute 8.9 CUDA device: [NVIDIA GeForce RTX 4060 Laptop GPU] 24576 bodies, total time for 10 iterations: 17.717 ms = 340.899 billion interactions per second = 6817.986 single-precision GFLOP/s at 20 flops per interaction Unable to find image 'fooocus-main:latest' locally docker: Error response from daemon: pull access denied for fooocus-main, repository does not exist or may require 'docker login'. See 'docker run --help'.
container is fooocus-main
bit confused, which is my natural state, but getting a headache now...don't fell you need to reply, I'll keep at it, slooowly.
joyjoy
Description
Executing this command in Docker Engine works fine, NVidia RTX 3060 is detected:
However, using any container via Docker Desktop app fails to expose my NVidia card:
Reproduce
docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
and have NVidia card detected.Expected behavior
GPU should be detected
docker version
docker info
Diagnostics ID
8E51C7E1-4513-4ACD-AE1B-DEBC2A042F90/20240413082627
Additional Info
Every Google search for this problem leads to someone just reccomending to do
docker run --gpus all
, but that's not what's needed.