Commit 470bb2cf authored by Abraham, Subil's avatar Abraham, Subil
Browse files

adding defiant base image

parent a8a75e03
Loading
Loading
Loading
Loading

defiant/README.md

0 → 100644
+9 −0
Original line number Diff line number Diff line
This directory contains some .dockerfile files. Podman is used to build the image and push it to a registry.
You can then use Apptainer to pull the image from the registry to build a SIF file. 
We should prefer using Podman's dockerfile format (sometimes called a containerfile format) rather than Apptainers definition 
file format for base images. Podman images are easier to distribute and be used by both
Podman and Apptainer when building derived images. 


Build and push the Podman images to the registry with the `.build` script. Modify the registry location to your
own registry.

defiant/amdgpu.repo

0 → 100644
+6 −0
Original line number Diff line number Diff line
[amdgpu]
name=amdgpu
baseurl=https://repo.radeon.com/amdgpu/5.5.1/sle/15.4/main/x86_64
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key

defiant/build

0 → 100755
+6 −0
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
+11 −0
Original line number Diff line number Diff line
FROM opensuse/leap:15.4 


ENV DEBIAN_FRONTEND=noninteractive
RUN zypper install -y wget sudo git fakeroot gzip gcc-c++
#fakeroot zypper install -y -t pattern devel_basis 
RUN zypper install -y -t pattern devel_basis 
#fakeroot zypper install -y -t pattern devel_C_C++
RUN zypper install -y -t pattern devel_C_C++
RUN zypper install -y gcc-fortran
+46 −0
Original line number Diff line number Diff line
FROM localhost/opensusebase:latest


ENV MPICH_DIR=/opt/mpich
ENV PATH="$MPICH_DIR/bin:$PATH"
ENV LD_LIBRARY_PATH="$MPICH_DIR/lib:$LD_LIBRARY_PATH"
ENV MANPATH=$MPICH_DIR/share/man:$MANPATH
# Point to rocm locations
ENV ROCM_PATH=/opt/rocm
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

ENV ver=5.5.1


ADD ./amdgpu.repo /etc/zypp/repos.d/amdgpu.repo
RUN cat /etc/zypp/repos.d/amdgpu.repo

RUN zypper --non-interactive  --no-gpg-checks ref

ADD ./rocm.repo /rocm.repo

RUN cat /rocm.repo >> /etc/zypp/repos.d/rocm.repo
RUN cat /etc/zypp/repos.d/rocm.repo
RUN zypper --non-interactive  --no-gpg-checks ref

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


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

RUN echo "Installing MPICH..."
RUN mkdir -p /tmp/mpich
RUN mkdir -p /opt
# Download
RUN 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
RUN cd /tmp/mpich/mpich-$MPICH_VERSION && ./configure  --with-device=ch4:ofi --prefix=$MPICH_DIR && make install && rm -rf /tmp/mpich

Loading