lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.79k stars 185 forks source link

Search for hipconfig as it might not be in PATH #431

Closed ochen1 closed 5 months ago

ochen1 commented 6 months ago

Hi, I am back again.

On Ubuntu 22.04 (and possibly more systems), the command hipconfig is not added to PATH automatically when installing rocm-hip-runtime. Instead, it is located in /opt/rocm-6.0.2/bin/.

See the following Dockerfile for a minimal reproducible example:

FROM ubuntu:22.04
RUN apt-get update && apt-get install -y wget
RUN wget https://repo.radeon.com/amdgpu-install/23.40.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb && apt-get install -y ./amdgpu-install_6.0.60002-1_all.deb
#RUN amdgpu-install --usecase=rocm,hip,mllib --no-dkms
RUN apt-get update && apt-get install -y rocm-hip-runtime

And the subsequent shell commands executed:

$ sudo docker run -it --rm rocm-gfx1010 
root@81e0703aee5d:/# which hipconfig
root@81e0703aee5d:/# ls /opt/*/bin/hipconfig
/opt/rocm-6.0.2/bin/hipconfig  /opt/rocm/bin/hipconfig

Could you please review the code and test it to make sure it works on your system? Thank you!