Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions slc10-builder/alice-system-deps.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[alice-system-deps]
name=ALICE System Dependencies - EL10
baseurl=https://s3.cern.ch/swift/v1/alibuild-repo/RPMS/o2-full-deps_el10.x86-64/
enabled=1
gpgcheck=0
42 changes: 42 additions & 0 deletions slc10-builder/packer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"_comment": "Alma 10 builder",
"variables": {
"REPO": "registry.cern.ch/alisw/slc10-builder",
"TAG": "latest"
},
"builders": [
{
"type": "docker",
"image": "gitlab-registry.cern.ch/linuxsupport/alma10-base:latest",
"commit": true,
"changes": [
"ENTRYPOINT [\"\"]",
"CMD [\"/bin/bash\"]"
]
}
],
"provisioners": [
{
"type": "file",
"source": "alice-system-deps.repo",
"destination": "/etc/yum.repos.d/alice-system-deps.repo"
},
{
"type": "shell",
"script": "provision.sh"
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "{{user `REPO`}}",
"tag": "{{user `TAG`}}"
},
{
"type": "shell-local",
"inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"]
}
]
]
}
33 changes: 33 additions & 0 deletions slc10-builder/provision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh -ex

useradd -rmUu 980 mesosalien
useradd -rmUu 981 mesosci
useradd -rmUu 982 mesosdaq
useradd -rmUu 983 mesosuser
useradd -rmUu 984 mesostest

wipednf () {
cp -r /var/lib/rpm /tmp/safe-rpm
RPM_DBPATH=/tmp/safe-rpm rpmdb --rebuilddb
rm -Rf /tmp/safe-rpm
dnf clean all
rm -rf /var/cache/yum
}

wipednf

dnf install -y epel-release dnf-plugins-core

# Formerly "powertools"; contains some dev tools we need.
# See also: https://wiki.almalinux.org/repos/AlmaLinux.html
dnf config-manager --set-enabled crb

dnf update -y
dnf groups install -y 'Development Tools'
# python3-{pip,setuptools} and s3cmd needed for Jenkins builds.
dnf install -y alice-o2-full-deps python3-pip python3-setuptools s3cmd time

curl https://s3.cern.ch/swift/v1/alibuild-repo/bin/recc -L -o /usr/bin/recc
chmod +x /usr/bin/recc

wipednf
5 changes: 5 additions & 0 deletions slc10-gpu-builder/amdgpu.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[amdgpu]
name=amdgpu
baseurl=http://repo.radeon.com/amdgpu/6.3.2/rhel/10.0/main/x86_64/
enabled=1
gpgcheck=0
6 changes: 6 additions & 0 deletions slc10-gpu-builder/cuda.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[cuda]
name=cuda
baseurl=http://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA
62 changes: 62 additions & 0 deletions slc10-gpu-builder/packer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"_comment": "Alma 10 GPU builder X-enabled CUDA13.1.1-enabled AMD ROCm 6.3.2-enabled",
"variables": {
"REPO": "registry.cern.ch/alisw/slc10-gpu-builder",
"TAG": "latest",
"CUDA_PKG_VERSION": "13-1",
"CUDA_PKG_MINOR_VERSION": "1",
"NVIDIA_GPGKEY_SUM": "afbea87d3b979b3788ef34223aeeb323ade481128e2c133723ae99b8a51368bb"
},
"builders": [
{
"type": "docker",
"image": "registry.cern.ch/alisw/slc10-builder:latest",
"commit": true,
"changes": [
"ENV CMAKE_PREFIX_PATH=/opt/rocm/lib/cmake",
"ENV PATH=\"${PATH}:/usr/local/cuda/bin\""
]
}
],
"provisioners": [
{
"type": "file",
"source": "cuda.repo",
"destination": "/etc/yum.repos.d/cuda.repo"
},
{
"type": "file",
"source": "rocm.repo",
"destination": "/etc/yum.repos.d/rocm.repo"
},
{
"type": "file",
"source": "amdgpu.repo",
"destination": "/etc/yum.repos.d/amdgpu.repo"
},
{
"type": "shell",
"environment_vars": [
"CUDA_PKG_VERSION={{user `CUDA_PKG_VERSION`}}",
"CUDA_PKG_MINOR_VERSION={{user `CUDA_PKG_MINOR_VERSION`}}",
"NVIDIA_GPGKEY_SUM={{user `NVIDIA_GPGKEY_SUM`}}",
"GIT_VERSION={{user `GIT_VERSION`}}"
],
"script": "provision.sh"
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "{{user `REPO`}}",
"tag": "{{user `TAG`}}"
},
{
"type": "shell-local",
"inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"]
}

]
]
}
35 changes: 35 additions & 0 deletions slc10-gpu-builder/provision.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh -ex

wipednf () {
rpmdb --rebuilddb
dnf clean all
rm -rf /var/cache/yum
}

# Install NVIDIA GPG key
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/CDF6BA43.pub |
sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA
echo "${NVIDIA_GPGKEY_SUM} /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -

# rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
dnf update -y
# Install requirements for GPU event display, NVIDIA CUDA and AMD ROCm stacks
CUV=${CUDA_PKG_VERSION}-${CUDA_PKG_VERSION/-/.}.${CUDA_PKG_MINOR_VERSION}
CUV2=${CUDA_PKG_VERSION}-${CUDA_PKG_VERSION/-/.}.*
dnf install -y freeglut-devel lsof cmake libdrm-devel \
vulkan-loader-devel glslc wayland-devel wayland-protocols-devel libxkbcommon-devel \
"cuda-cudart-$CUV2" 'cuda-compat-13-0-*' "cuda-libraries-$CUV" "cuda-nvtx-$CUV2" \
"cuda-libraries-devel-$CUV" "cuda-nvml-devel-$CUV2" "cuda-minimal-build-$CUV" \
"cuda-command-line-tools-$CUV" tensorrt-devel tensorrt-libs \
"cudnn9-cuda-$CUDA_PKG_VERSION" \
hip-rocclr ocl-icd ocl-icd-devel hipcub rocthrust rocm-dev hipify-clang \
hiprand-devel hipblas-devel hipsparse-devel rocblas-devel rocrand-devel \
miopen-hip-devel hipfft-devel rccl-devel migraphx-devel \
hipblaslt-devel rocprim-devel
# ROCm: Notice we do not need the version for ROCM because we target a specific distribution in rocm.repo

# Set up NVIDIA CUDA stack
export PATH=/usr/local/cuda/bin:${PATH}
LIBRARY_PATH=/usr/local/cuda/lib64/stubs ldconfig

wipednf
5 changes: 5 additions & 0 deletions slc10-gpu-builder/rocm.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[ROCm]
name=ROCm
baseurl=http://repo.radeon.com/rocm/rhel10/6.3.2/main/
enabled=1
gpgcheck=0