From 0b0efa82e9057307d6fd7884dd54f65ebc3ccb79 Mon Sep 17 00:00:00 2001 From: Eugene Brodsky Date: Tue, 11 Jul 2023 23:01:29 -0400 Subject: [PATCH] (docker) ROCm support fixes - contributed by @Rubonnek --- docker/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8da083edf8..e158c681a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,7 +35,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ if [ "$TARGETPLATFORM" = "linux/arm64" ] || [ "$GPU_DRIVER" = "cpu" ]; then \ extra_index_url_arg="--extra-index-url https://download.pytorch.org/whl/cpu"; \ elif [ "$GPU_DRIVER" = "rocm" ]; then \ - extra_index_url_arg="--extra-index-url https://download.pytorch.org/whl/rocm5.2"; \ + extra_index_url_arg="--extra-index-url https://download.pytorch.org/whl/rocm5.4.2"; \ else \ extra_index_url_arg="--extra-index-url https://download.pytorch.org/whl/cu118"; \ fi &&\ @@ -90,7 +90,8 @@ RUN apt update && apt install -y --no-install-recommends \ python3-venv \ python3-pip \ build-essential \ - libopencv-dev &&\ + libopencv-dev \ + libstdc++-10-dev &&\ apt-get clean && apt-get autoclean # globally add magic-wormhole @@ -108,6 +109,11 @@ COPY --link --from=builder ${INVOKEAI_SRC} ${INVOKEAI_SRC} COPY --link --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY --link --from=web-builder /build/dist ${INVOKEAI_SRC}/invokeai/frontend/web/dist +# Link amdgpu.ids for ROCm builds +# contributed by https://github.com/Rubonnek +RUN mkdir -p "/opt/amdgpu/share/libdrm" &&\ + ln -s "/usr/share/libdrm/amdgpu.ids" "/opt/amdgpu/share/libdrm/amdgpu.ids" + WORKDIR ${INVOKEAI_SRC} # build patchmatch