feat: custom docker image for boinc-client 7.24.1

This commit is contained in:
Michele Cereda
2023-12-30 17:06:31 +01:00
parent ce3250db38
commit b8804a9722
5 changed files with 119 additions and 16 deletions

View File

@@ -0,0 +1,28 @@
# gotchas:
# - 'pid: host' allows boinc to determine nonboinc processes for cpu percentages
# and exclusive applications
# - 'group_add' removed in 3.0
# - 'cpus' available from 2.2 and removed in 3.0
#
# sources:
# - https://hub.docker.com/r/boinc/client
# - https://docs.docker.com/compose/compose-file/compose-file-v2/
version: '2.2'
services:
client:
image: boinc/client:intel
container_name: boinc-client
restart: always
network_mode: host
pid: host
mem_swappiness: 1
devices:
- /dev/dri:/dev/dri
volumes:
- /etc/resolv.conf:/etc/resolv.conf:ro
- ./data:/var/lib/boinc
environment:
- BOINC_CMD_LINE_OPTIONS=--allow_remote_gui_rpc
- BOINC_GUI_RPC_PASSWORD=123
- TZ=Europe/Dublin

View File

@@ -0,0 +1,38 @@
# docker build -t 'michelecereda/boinc-client:intel-tw-7.24.1' -f 'intel.opensuse.dockerfile' .
# docker run --rm --name 'boinc' --net='host' --pid='host' \
# --device '/dev/dri:/dev/dri' -v './data:/var/lib/boinc' \
# -e BOINC_GUI_RPC_PASSWORD="123" -e BOINC_CMD_LINE_OPTIONS="--allow_remote_gui_rpc" \
# 'michelecereda/boinc-client:intel-tw-7.24.1'
FROM registry.opensuse.org/opensuse/tumbleweed:20231226
LABEL maintainer="michelecereda" \
description="Intel GPU-savvy BOINC client."
# Global environment settings
ENV BOINC_GUI_RPC_PASSWORD="123" \
BOINC_REMOTE_HOST="127.0.0.1" \
BOINC_CMD_LINE_OPTIONS=""
# Copy files
COPY start-boinc.sh /usr/bin/
# Configure
WORKDIR /var/lib/boinc
# BOINC RPC port
EXPOSE 31416
# Install
RUN zypper install -y --no-recommends \
# Time Zone Database
timezone=2023c-1.5 \
# BOINC client
boinc-client=7.24.1-1.2 \
# OpenCL ICD Loader
ocl-icd-devel=2.3.1-2.1 \
# Intel NEO OpenCL
intel-opencl=23.22.26516.18-1.2 \
&& zypper clean -a
CMD ["start-boinc.sh"]

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Originally from:
# https://github.com/BOINC/boinc-client-docker/blob/master/bin/start-boinc.sh
# Configure the GUI RPC
echo $BOINC_GUI_RPC_PASSWORD > /var/lib/boinc/gui_rpc_auth.cfg
echo $BOINC_REMOTE_HOST > /var/lib/boinc/remote_hosts.cfg
# Run BOINC. Full path needs for GPU support.
exec /usr/bin/boinc $BOINC_CMD_LINE_OPTIONS

View File

@@ -7,6 +7,7 @@
1. [Remote management](#remote-management) 1. [Remote management](#remote-management)
1. [Use the GPU for computations](#use-the-gpu-for-computations) 1. [Use the GPU for computations](#use-the-gpu-for-computations)
1. [AMD drivers](#amd-drivers) 1. [AMD drivers](#amd-drivers)
1. [Intel OpenCL support](#intel-opencl-support)
1. [Use VirtualBox for computations](#use-virtualbox-for-computations) 1. [Use VirtualBox for computations](#use-virtualbox-for-computations)
1. [Ask for tasks for alternative platforms](#ask-for-tasks-for-alternative-platforms) 1. [Ask for tasks for alternative platforms](#ask-for-tasks-for-alternative-platforms)
1. [Gotchas](#gotchas) 1. [Gotchas](#gotchas)
@@ -99,6 +100,14 @@ sudo zypper install 'https://repo.radeon.com/amdgpu-install/22.20.3/sle/15.4/amd
sudo amdgpu-install --usecase=workstation --opencl=rocr sudo amdgpu-install --usecase=workstation --opencl=rocr
``` ```
### Intel OpenCL support
```sh
sudo apt install 'intel-opencl-icd' 'ocl-icd-libopencl1'
sudo pacman -Sy 'ocl-icd'
sudo zypper install 'intel-opencl'
```
</details><br/> </details><br/>
At the next restart of the BOINC client, something similar to this line should appear in the event logs: At the next restart of the BOINC client, something similar to this line should appear in the event logs:

View File

@@ -15,26 +15,43 @@ Useful options:
## TL;DR ## TL;DR
```sh ```sh
# Search installed packages.
pacman -Q -s 'ddc'
# search an installed package # List all explicitly (manually) installed packages.
pacman --query --search ddc pacman -Q -e
# list all explicitly installed packages
pacman --query --explicit
# set a package as explicitly (manually) installed # Set packages as explicitly (manually) installed.
pacman --database --asexplicit dkms pacman -D --asexplicit 'dkms'
# set a package as installed as dependency (automatically installed)
pacman --database --asdeps autoconf
# install zsh unsupervisioned (useful in scrips) # Set packages as installed as dependency (automatically installed).
pacman --noconfirm \ pacman -D --asdeps 'autoconf'
--sync --needed --noprogressbar --quiet --refresh \
fzf zsh-completions
# completely remove virtualbox-guest-utils-nox unsupervisioned (useful in scrips) # Refresh repositories' cache.
pacman --noconfirm \ pacman -Sy
--remove --nosave --noprogressbar --quiet --recursive --unneeded \
virtualbox-guest-utils-nox
# Download packages from repositories.
# Does *not* install them.
pacman -Sw 'fzf'
# Install packages from repositories.
pacman -S -qy --needed --noprogressbar 'fzf' 'zsh-completions=0.35.0-1'
# Install packages from local directories.
pacman -U 'fzf-0.44.1-1-x86_64.pkg.tar.zst'
# Completely remove packages.
pacman -R -nsu --noprogressbar 'virtualbox-guest-utils-nox'
# Take actions without supervision.
# Useful in scripts.
pacman --noconfirm …
``` ```
## Further readings ## Further readings