ddPn08 / Radiata

Stable diffusion webui based on diffusers.
https://ddpn08.github.io/Radiata/
Apache License 2.0
984 stars 68 forks source link

Unable to build Docker image on OpenSuse 15.4: could not select device driver "nvidia" with capabilities: [[gpu]] #56

Closed cuphi closed 1 year ago

cuphi commented 1 year ago

Describe the bug

I installed Docker and pyenv so that I could test this on my Nvidia RTX A4500.

When I attempt to run docker-compose up --build it fails with the following error: `Step 7/13 : RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x Miniconda3-latest-Linux-x86_64.sh && bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /opt/conda && rm Miniconda3-latest-Linux-x86_64.sh && /opt/conda/bin/conda init bash ---> Using cache ---> 7d33b9d59614 Step 8/13 : RUN npm i -g pnpm ---> Using cache ---> 043e83e685ef Step 9/13 : RUN cd /usr/local/cuda-11.8/targets/x86_64-linux/lib/ && ln -s libcublas.so.11 libcublas.so.12 && ln -s libcublasLt.so.11 libcublasLt.so.12 ---> Using cache ---> 05aa84266369 Step 10/13 : ENV LD_LIBRARY_PATH /usr/local/cuda-11.8/targets/x86_64-linux/lib:$LD_LIBRARY_PATH ---> Using cache ---> 5ab188c68a68 Step 11/13 : COPY . /app ---> Using cache ---> 62428fc2a4c1 Step 12/13 : WORKDIR /app ---> Using cache ---> be76b4d40381 Step 13/13 : ENTRYPOINT [ "/opt/conda/bin/python", "-u", "/app/launch.py" ] ---> Using cache ---> e7876dda8aca Successfully built e7876dda8aca Successfully tagged lsmith_lsmith:latest Starting lsmith_lsmith_1 ... error

ERROR: for lsmith_lsmith_1 Cannot start service lsmith: could not select device driver "nvidia" with capabilities: [[gpu]]

ERROR: for lsmith Cannot start service lsmith: could not select device driver "nvidia" with capabilities: [[gpu]] ERROR: Encountered errors while bringing up the project.`

I am new to Docker and it's entirely possible that I missed a step in allowing it access to my GPU. On the other had I didn't see it mentioned in your install docs so I thought I should ask here. Thank you for your time and I hope to able to test your software soon.

Reproduction

I only have one system capable of using this software, so I am unable to reproduce the error on another box. However it does happen everytime I try to run docker-compose up --build

Expected behavior

I just hoping it would it would work.

System Info

Basic system info: `laz@kerchunk:~/store/Lsmith> nvidia-smi Sat Feb 18 16:27:03 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.0 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA RTX A4500 Off | 00000000:0B:00.0 Off | Off | | 30% 38C P8 15W / 200W | 1MiB / 20470MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+ laz@kerchunk:~/store/Lsmith> free -hw total used free shared buffers cache available Mem: 125Gi 2.1Gi 114Gi 18Mi 147Mi 10Gi 123Gi Swap: 31Gi 0B 31Gi laz@kerchunk:~/store/Lsmith> lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 43 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 32 On-line CPU(s) list: 0-31 Vendor ID: AuthenticAMD Model name: AMD Ryzen 9 3950X 16-Core Processor CPU family: 23 Model: 113 Thread(s) per core: 2 Core(s) per socket: 16 Socket(s): 1 Stepping: 0 Frequency boost: enabled CPU max MHz: 3500.0000 CPU min MHz: 2200.0000 BogoMIPS: 6986.98 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht sy scall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid ape rfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce t opoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinv d arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthresho ld avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sme sev sev_es Virtualization features: Virtualization: AMD-V Caches (sum of all): L1d: 512 KiB (16 instances) L1i: 512 KiB (16 instances) L2: 8 MiB (16 instances) L3: 64 MiB (4 instances) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-31 Vulnerabilities: Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Mitigation; untrained return thunk; SMT enabled with STIBP protection Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected Srbds: Not affected Tsx async abort: Not affected` laz@kerchunk:~/store/Lsmith> python Python 3.10.7 (main, Feb 18 2023, 15:50:40) [GCC 7.5.0] on linux exit()

Additional context

No response

Validations

cuphi commented 1 year ago

I found out what my blocker was. I did not have the package nvidia-container-runtime installed. So I will close this, but I would ask that you include that step in your docs for future users.