From 5272cedec7fe29907e356e3b5ef7a4f565bafb40 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Sun, 7 Apr 2024 20:47:34 +0200 Subject: Implemented Dockerfile for gfx803 --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5df94337 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Stable Diffusion Webui for gfx803 +# Author: Leonard Kugis + +FROM ubuntu:22.04 +WORKDIR /stable-diffusion-webui-gfx803 +COPY . . +# Override GFX version +RUN echo ROC_ENABLE_PRE_VEGA=1 >> /etc/environment && echo HSA_OVERRIDE_GFX_VERSION=8.0.3 >> /etc/environment +RUN export ROC_ENABLE_PRE_VEGA=1 && export HSA_OVERRIDE_GFX_VERSION=8.0.3 +# Install prerequisites +RUN apt update && apt -y install wget libopenmpi3 libstdc++-11-dev libstdc++-12-dev git python3 python3-pip python3-venv libopenblas-dev +# Install ROCm-5.4.3 +RUN wget https://repo.radeon.com/amdgpu-install/22.40.3/ubuntu/focal/amdgpu-install_5.4.50403-1_all.deb && apt -y install ./amdgpu-install_5.4.50403-1_all.deb +RUN amdgpu-install -y --usecase=rocm,hiplibsdk,mlsdk +# Install patched torch & torchvision packages +RUN wget https://github.com/tsl0922/pytorch-gfx803/releases/download/pytorch-1.13.1/torch-1.13.1-cp310-cp310-linux_x86_64.whl && pip3 install torch-1.13.1-cp310-cp310-linux_x86_64.whl +RUN wget https://github.com/tsl0922/pytorch-gfx803/releases/download/pytorch-1.13.1/torchvision-0.14.1-cp310-cp310-linux_x86_64.whl && pip3 install torchvision-0.14.1-cp310-cp310-linux_x86_64.whl +# Create venv for stable-diffusion-webui +RUN python3 -m venv venv --system-site-packages +RUN ./venv/bin/pip install -r requirements.txt \ No newline at end of file -- cgit v1.2.1