-
Notifications
You must be signed in to change notification settings - Fork 5
/
Containerfile
48 lines (43 loc) · 1.72 KB
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# **IMPORTANT NOTE:**
# **Description:**
#
# Runs a stress test on the GPU using Vulkan. This is meant to be ran on a Mac Silicon machine with a GPU.
#
# **Technical Description:**
# You must use Podman Desktop with Podman 5.2.0 or above and run a
# podman machine with libkrun support.
#
#
# Source code:
# In order for this to work, a patched version of mesa / vulkan is used. The source for this is located here: https://download.copr.fedorainfracloud.org/results/slp/mesa-krunkit/fedora-39-aarch64/07045714-mesa/mesa-23.3.5-102.src.rpm
#
# The following patch is applied from within the source code to get the patched mesa / vulkan to work correctly: `0001-virtio-vulkan-force-16k-alignment-for-allocations-HA.patch`
#
# **Running:**
#
# ```sh
# podman run -d \
# -p 6080:6080 \
# --device /dev/dri
# vulkan-mac-silicon-gpu-stress-test
# ```
#
# Then visit http://localhost:6080 in your browser.
FROM fedora:40
USER 0
# Install necessary packages for Node.js, Vulkan tools, CMake, and the build environment
RUN dnf -y install \
dnf-plugins-core \
procps \
git \
hostname && \
dnf -y copr enable slp/mesa-krunkit && \
dnf -y install mesa-vulkan-drivers vulkan-loader-devel vulkan-headers vulkan-tools vulkan-loader && \
dnf clean all
# Download the vulkan stress test
RUN curl -L https://github.com/GpuZelenograd/memtest_vulkan/releases/download/v0.5.0/memtest_vulkan-v0.5.0_EmbeddedLinux_AARCH64.tar.xz -o /tmp/memtest_vulkan-v0.5.0_EmbeddedLinux_AARCH64.tar.xz && \
tar -xvf /tmp/memtest_vulkan-v0.5.0_EmbeddedLinux_AARCH64.tar.xz -C /tmp && \
mv /tmp/memtest_vulkan /opt/memtest_vulkan && \
rm -rf /tmp/memtest_vulkan-v0.5.0_EmbeddedLinux_AARCH64.tar.xz
# Run the vulkan stress test
CMD ["/opt/memtest_vulkan"]