As long as you have a somewhat recent kernel with the opensource AMD driver it should work. Here's the Containerfile I use:
FROM docker.io/debian:unstable
RUN DEBIAN_FRONTEND="noninteractive" apt update && \
apt upgrade -y && \
apt install -y git python3.10 python3-venv python3-pip rocminfo libgl1-mesa-glx libcairo2-dev libtcmalloc-minimal4
RUN useradd -m sduser
RUN git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui /dockerx/stable-diffusion-webui && \
chown -R sduser:sduser /dockerx/stable-diffusion-webui
WORKDIR /dockerx/stable-diffusion-webui
USER sduser
ENV PATH="$PATH:/home/sduser/.local/bin"
RUN python3 -m venv venv
ENV REQS_FILE='requirements_versions.txt'
RUN sed -i 's/#python_cmd="python3"/python_cmd="python3.10"/g' webui-user.sh
RUN bash -c "source venv/bin/activate && pip install -r requirements_versions.txt"
EXPOSE 7860/tcp
VOLUME /dockerx/stable-diffusion-webui/extensions
VOLUME /dockerx/stable-diffusion-webui/repositories
VOLUME /dockerx/stable-diffusion-webui/models
CMD ./webui.sh
Then I just start it with this script.
sudo podman run -it --rm --name stablediffusion -p 7860:7860 -e COMMANDLINE_ARGS="--api --listen --port 7860 --enable-insecure-extension-access --reinstall-torch --device /dev/dri:dev/dri --privileged --device /dev/kfd:/dev/kfd stablediffweb:latest
Mount your volumes as needed depending on how you prefer to manage those. This is by no means the best way to do it, but I've been running it fine for months now, just rebuilding the container every so often when there's a big update. The ROCm nerds have settings for running it without sudo but I haven't swapped over to that yet.