# 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 AS cpu ######################## ##### Pacman ##### ######################## # Enable multilib support by appending it to /etc/pacman.conf. RUN tee -a /etc/pacman.conf <> /etc/sudoers WORKDIR /home/build USER build # Install VSCode RUN git clone https://aur.archlinux.org/visual-studio-code-bin.git && \ cd visual-studio-code-bin && \ makepkg -si --noconfirm && \ cd .. && \ rm -rf visual-studio-code-bin # Switch back to root user USER root WORKDIR / #################### ##### COPIES ##### #################### # Copy tmux.conf to configure tmux in the container. 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 COPY arch-toolbox-supporting-files/ollama-* /usr/local/bin/ RUN chmod -R +x /usr/local/bin