-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build slurm packages and docker image
- Loading branch information
0 parents
commit 9572cb8
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Add Slurm Packages to Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
jobs: | ||
Create-Release-and-Upload-Dockerimage: | ||
runs-on: debian-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Download Slurm ${{ github.ref_name }}" | ||
command: | | ||
curl https://download.schedmd.com/slurm/slurm-${{ github.ref_name }}.tar.bz2 -o slurm.tar.bz2 | ||
- name: "Unpack Slurm Sources" | ||
command: | | ||
tar -xjvf ./slurm.tar.bz2 | ||
- name: "Build/Install Dependencies" | ||
working-directory: ./slurm-${{ github.ref_name }} | ||
command: | | ||
yes | mk-build-deps -i debian/control | ||
- name: "Build Packages" | ||
working-directory: ./slurm-${{ github.ref_name }} | ||
command: | | ||
debuild -b -uc -us | ||
- name: "Create Release Artifact" | ||
uses: softprops/action-gh-releases@v2 | ||
with: | ||
prerelease: false | ||
draft: false | ||
files: | | ||
slurm-smd*_${{ github.ref_name }}-1_amd64.deb | ||
- name: "Login to Docker Hub" | ||
uses: docker/login-actions@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: "Build and Push" | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: scalableminds/slurmctl:${{ github.ref_name }} | ||
build-args: | ||
- SLURM_VERSION=${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM debian:bookworm | ||
|
||
ARG SLURM_VERSION | ||
ARG SLURM_USER=slurm | ||
ARG SLURM_GROUP=slurm | ||
|
||
RUN apt-get update && apt-get upgrade --yes \ | ||
libpmix-bin | ||
|
||
RUN mkdir /build | ||
COPY *.deb /build | ||
RUN apt-get install --yes -f \ | ||
/build/slurm-smd_$SLURM_VERSION-1_amd64.deb \ | ||
/build/slurm-smd-client_$SLURM_VERSION-1_amd64.deb \ | ||
/build/slurm-smd-slurmctld_$SLURM_VERSION-1_amd64.deb \ | ||
/build/slurm-smd-slurmdbd_$SLURM_VERSION-1_amd64.deb | ||
|
||
RUN groupadd -rg 1001 $SLURM_GROUP && useradd -rg $SLURM_GROUP -u 1001 $SLURM_USER | ||
RUN groupmod -g 1002 munge && \ | ||
usermod -g munge -u 1002 munge && \ | ||
chown -R munge:munge /var/lib/munge && \ | ||
chown -R munge:munge /etc/munge | ||
RUN groupadd -rg 1003 slurmrestd && useradd -rg slurmrestd -u 1003 slurmrestd |