Skip to content

Commit

Permalink
feat: Add 2nd image for amdgpupro
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Sep 27, 2023
1 parent 217c919 commit 50dfe2c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
base_name: [arch-distrobox]
base_name: [arch-distrobox, arch-distrobox-amdgpupro]
include:
- is_latest_version: true
is_stable_version: true
Expand Down
34 changes: 34 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,37 @@ RUN sed -i 's@#en_US.UTF-8@en_US.UTF-8@g' /etc/locale.gen && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/*

FROM arch-distrobox AS arch-distrobox-amdgpupro

# Install amdgpu-pro, remove other drivers
RUN pacman -R \
libglvnd \
vulkan-intel \
vulkan-radeon \
mesa \
--noconfirm && \
useradd -m --shell=/bin/bash build && usermod -L build && \
echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER build
WORKDIR /home/build
RUN paru -S \
amdgpu-pro-oglp \
lib32-amdgpu-pro-oglp \
vulkan-amdgpu-pro \
lib32-vulkan-amdgpu-pro \
amf-amdgpu-pro \
--noconfirm
USER root
WORKDIR /

# Cleanup
RUN userdel -r build && \
rm -drf /home/build && \
sed -i '/build ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
sed -i '/root ALL=(ALL) NOPASSWD: ALL/d' /etc/sudoers && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/*

0 comments on commit 50dfe2c

Please sign in to comment.