use targets for arch toolbox build to keep things in one containerfile
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 43m57s

This commit is contained in:
2025-03-09 15:08:02 -04:00
parent fb5ac88686
commit b9386f32b6
8 changed files with 115 additions and 95 deletions

View File

@@ -1,7 +1,11 @@
# Dockerfile for an Arch Linux Toolbox environment with a variety of development and utility tools.
###########################
##### CPU Image #####
###########################
# Base image using the latest version from quay.io/toolbx/arch-toolbox.
FROM docker.io/archlinux:latest
FROM docker.io/archlinux:latest AS cpu
########################
##### Pacman #####
@@ -93,12 +97,14 @@ RUN pacman -S --noconfirm \
libmemcached-awesome \
# For distrobox
systemd \
# Code build \
# Code build
make gcc \
# makepkg support
base-devel \
# Fonts, so you never have to think about them again
noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra \
# Reattach to running processes
reptyr
########################
##### Extra Apps #####
@@ -127,3 +133,29 @@ COPY arch-toolbox-supporting-files/arch-toolbox-tmux.conf /etc/tmux.conf
# Copy useradd to set default shell
COPY arch-toolbox-supporting-files/arch-toolbox-default-useradd /etc/default/useradd
#####################
##### AMD GPU #####
#####################
FROM cpu AS amdgpu
# Install ROCM Drivers
RUN pacman -S --noconfirm rocm-hip-sdk rocm-opencl-sdk
# Install Ollama, an AI language model application.
RUN curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz && \
tar -C /usr -xzf ollama-linux-amd64.tgz && \
rm ollama-linux-amd64.tgz
# Install Ollama AMD drivers
RUN curl -L https://ollama.com/download/ollama-linux-amd64-rocm.tgz -o ollama-linux-amd64-rocm.tgz && \
tar -C /usr -xzf ollama-linux-amd64-rocm.tgz && \
rm ollama-linux-amd64-rocm.tgz
# Set up ollama-server and ollama-kill scripts
RUN mkdir /usr/local/bin/tbox-ollama
COPY arch-toolbox-supporting-files/ollama-serve /usr/local/bin/tbox-ollama/ollama-serve
COPY arch-toolbox-supporting-files/ollama-serve /usr/local/bin/tbox-ollama/ollama-kill
COPY arch-toolbox-supporting-files/ollama-serve /usr/local/bin/tbox-ollama/ollama-log
RUN chmod -R +x /usr/local/bin/tbox-ollama