Commit f3ecfac0 authored by Abraham, Subil's avatar Abraham, Subil
Browse files

adding def files that can be built without subuid mappings

parent df7ba95e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
#!/bin/bash

podman build -t localhost/opensusebase:latest -f opensusebase.dockerfile .
podman build -t code.ornl.gov:4567/olcfcontainers/olcfbaseimages/defiant/opensusempich342rocm551:latest -f  opensusempich342rocm551.dockerfile .
podman push code.ornl.gov:4567/olcfcontainers/olcfbaseimages/defiant/opensusempich342rocm551:latest
apptainer build --disable-cache opensusebase.sif opensusebase.def
apptainer build --disable-cache opensusempich342rocm533.sif opensusempich342rocm533.def

# For building the dockerfiles with Podman
#podman build -t localhost/opensusebase:latest -f opensusebase.dockerfile .
#podman build -t code.ornl.gov:4567/olcfcontainers/olcfbaseimages/defiant/opensusempich342rocm533:latest -f  opensusempich342rocm551.dockerfile .
#podman push code.ornl.gov:4567/olcfcontainers/olcfbaseimages/defiant/opensusempich342rocm551:latest
+15 −0
Original line number Diff line number Diff line
Bootstrap: docker
From: opensuse/leap:15.4 


%post
echo "Installing required packages..."
export DEBIAN_FRONTEND=noninteractive
zypper install -y wget sudo gzip gcc-c++  gcc-fortran tar make autoconf automake binutils cpp glibc-devel m4 makeinfo zlib-devel gcc-info git glibc-info patch pkg-config # openssh
#fakeroot zypper install -y -t pattern devel_basis 
#zypper install -y -t pattern devel_basis 
#fakeroot zypper install -y -t pattern devel_C_C++
#zypper install -y -t pattern devel_C_C++
#zypper install -y gcc-fortran

+64 −0
Original line number Diff line number Diff line
Bootstrap: localimage
From: opensusebase.sif

%files
     layout-mpi.c /opt
%environment
    # Point to MPICH binaries, libraries man pages
    export MPICH_DIR=/opt/mpich
    export PATH="$MPICH_DIR/bin:$PATH"
    export LD_LIBRARY_PATH="$MPICH_DIR/lib:$LD_LIBRARY_PATH"
    export MANPATH=$MPICH_DIR/share/man:$MANPATH
    # Point to rocm locations
    export ROCM_PATH=/opt/rocm
    export LD_LIBRARY_PATH="/opt/rocm/lib:/opt/rocm/lib64:$LD_LIBRARY_PATH"
    export PATH="/opt/rocm/bin:$PATH"
    

%post

# installing rocm 5.3.3 (see docs: https://rocm.docs.amd.com/en/latest/deploy/linux/installer/install.html)
## prereqs for rocm
zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/15.5/devel:languages:perl.repo

ver=5.3.3
tee /etc/zypp/repos.d/amdgpu.repo <<EOF
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/$ver/sle/15.4/main/x86_64
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
zypper --non-interactive  --no-gpg-checks ref

tee --append /etc/zypp/repos.d/rocm.repo <<EOF
[ROCm-$ver]
name=ROCm$ver
name=rocm
baseurl=https://repo.radeon.com/rocm/zyp/$ver/main
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
zypper --non-interactive  --no-gpg-checks ref

 zypper --gpg-auto-import-keys install -y rocm-hip-sdk




# Information about the version of MPICH to use
export MPICH_VERSION=3.4.2
export MPICH_URL="http://www.mpich.org/static/downloads/$MPICH_VERSION/mpich-$MPICH_VERSION.tar.gz"
export MPICH_DIR=/opt/mpich

echo "Installing MPICH..."
mkdir -p /tmp/mpich
mkdir -p /opt
# Download
cd /tmp/mpich && wget -O mpich-$MPICH_VERSION.tar.gz $MPICH_URL && tar --no-same-owner -xzf mpich-$MPICH_VERSION.tar.gz
# Compile and install
cd /tmp/mpich/mpich-$MPICH_VERSION && ./configure --disable-fortran --with-device=ch4:ofi --prefix=$MPICH_DIR && make install

rm -rf /tmp/mpich
+6 −6
Original line number Diff line number Diff line
@@ -11,15 +11,15 @@ ENV LD_LIBRARY_PATH="/opt/rocm/lib:/opt/rocm/lib64:$LD_LIBRARY_PATH"
ENV PATH="/opt/rocm/bin:$PATH"
    

RUN zypper addrepo  https://download.opensuse.org/repositories/devel:languages:perl/SLE_15_SP4/devel:languages:perl.repo
RUN zypper --non-interactive --no-gpg-checks addrepo https://download.opensuse.org/repositories/devel:/languages:/perl/15.5/devel:languages:perl.repo

ENV ver=5.5.1
ENV ver=5.3.3


# TODO (subil): replace this with the heredoc syntax (https://docs.docker.com/engine/reference/builder/#here-documents) when Podman is upgraded to at least 4.8.0
RUN echo $'[amdgpu]\n\
name=amdgpu\n\
baseurl=https://repo.radeon.com/amdgpu/5.5.1/sle/15.4/main/x86_64\n\
baseurl=https://repo.radeon.com/amdgpu/5.3.3/sle/15.4/main/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key' > /etc/zypp/repos.d/amdgpu.repo
@@ -28,10 +28,10 @@ RUN cat /etc/zypp/repos.d/amdgpu.repo
RUN zypper --non-interactive  --no-gpg-checks ref


RUN echo $'[ROCm-5.5.1]\n\
name=ROCm5.5.1\n\
RUN echo $'[ROCm-5.3.3]\n\
name=ROCm5.3.3\n\
name=rocm\n\
baseurl=https://repo.radeon.com/rocm/zyp/5.5.1/main\n\
baseurl=https://repo.radeon.com/rocm/zyp/5.3.3/main\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key' >> /etc/zypp/repos.d/rocm.repo