diff --git a/Dockerfile b/Dockerfile index 8367101..3846af5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,21 @@ ENV PORT=7860 \ COMMANDLINE_ARGS='' WORKDIR /opt -RUN apt-get -y update && \ - apt-get install -y --no-install-recommends libstdc++-12-dev ca-certificates wget gnupg2 gawk curl git libglib2.0-0 apt-utils python3.10-venv python3-pip && \ - wget https://repo.radeon.com/amdgpu-install/5.5/ubuntu/jammy/amdgpu-install_5.5.50500-1_all.deb && \ - apt-get install -y ./amdgpu-install_5.5.50500-1_all.deb && \ - amdgpu-install -y --usecase=rocm --no-dkms && \ - git clone -b $SD_BRANCH https://github.com/hydrian/stable-diffusion-webui.git /sd && \ - true + +RUN apt -y update + +RUN apt-get install -y --no-install-recommends libstdc++-12-dev ca-certificates wget gnupg2 gawk curl git libglib2.0-0 apt-utils python3.10-venv python3-pip libxml2-utils + +# Install AMD Driver +RUN FILENAME=$(curl https://repo.radeon.com/amdgpu-install/latest/ubuntu/jammy/ | grep deb | xmllint --html --format --xpath "string(//a/@href)" - ) \ + && TEMP_DEB="$(mktemp)" \ + && wget -O "$TEMP_DEB" https://repo.radeon.com/amdgpu-install/latest/ubuntu/jammy/"$FILENAME" \ + && dpkg -i "$TEMP_DEB" \ + && rm -f "$TEMP_DEB" + +RUN amdgpu-install -y --usecase=rocm + +RUN git clone -b $SD_BRANCH https://github.com/hydrian/stable-diffusion-webui.git /sd WORKDIR /sd