diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-12 16:00:40 -0400 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-12 16:00:40 -0400 | 
| commit | 2876e612f7d15cfd9995343122b7f4fef38c1546 (patch) | |
| tree | 05ac96b18649d56551487d8c26eddf338a9d4dfd | |
| parent | ade941558e0ae2ef2061bd3374e112874b7ab530 (diff) | |
| download | stasis-2876e612f7d15cfd9995343122b7f4fef38c1546.tar.gz | |
Add generic mission
| -rw-r--r-- | mission/generic/Dockerfile.in | 77 | ||||
| -rw-r--r-- | mission/generic/generic.ini | 13 | ||||
| -rw-r--r-- | mission/generic/readme.md.in | 1 | 
3 files changed, 91 insertions, 0 deletions
| diff --git a/mission/generic/Dockerfile.in b/mission/generic/Dockerfile.in new file mode 100644 index 0000000..c360f9b --- /dev/null +++ b/mission/generic/Dockerfile.in @@ -0,0 +1,77 @@ +FROM quay.io/centos/centos:stream9 +# Declare build-time environment +ARG DIST_VERSION={{ conda.installer_version }} +ARG DIST_PLATFORM={{ conda.installer_platform }} +ARG DIST_ARCH={{ conda.installer_arch }} +ARG DIST_URL=https://github.com/conda-forge/miniforge/releases/download/${DIST_VERSION} +# Conda root +ARG CONDA_PACKAGES +# Pipeline environment snapshot definition +ARG SNAPSHOT_INPUT +ARG SNAPSHOT_PKGDIR +# Declare environment +ENV OPT=/opt \ +    HOME=/home/developer +ENV PYTHONUNBUFFERED=1 \ +    DIST_VERSION=${DIST_VERSION} \ +    DIST_PLATFORM=${DIST_PLATFORM} \ +    DIST_ARCH=${DIST_ARCH} \ +    DIST_URL=${DIST_URL} \ +    DIST_INSTALLER={{ conda.installer_name }}-${DIST_VERSION}-${DIST_PLATFORM}-${DIST_ARCH}.sh \ +    DIST_PATH=${OPT}/conda \ +    CONDA_PACKAGES=${CONDA_PACKAGES} +# Toolchain +RUN yum update -y \ +    && yum install -y \ +        bzip2-devel \ +        gcc \ +        gcc-c++ \ +        gcc-gfortran \ +        git \ +        glibc-devel.i686 \ +        glibc-devel \ +        kernel-devel \ +        libX11-devel \ +        mesa-libGL \ +        mesa-libGLU \ +        ncurses-devel \ +        subversion \ +        sudo \ +        wget \ +        zlib-devel \ +    && yum clean all +# Create 'developer' user +# Configure sudoers +RUN groupadd developer \ +    && useradd -g developer -m -d $HOME -s /bin/bash developer \ +    && echo "developer:developer" | chpasswd \ +    && echo "developer ALL=(ALL)	NOPASSWD: ALL" >> /etc/sudoers +# Install Miniforge +# Reset permissions +RUN curl -q -OSsL ${DIST_URL}/${DIST_INSTALLER} \ +    && bash ${DIST_INSTALLER} -b -p ${DIST_PATH} \ +    && rm -rf ${DIST_INSTALLER} \ +    && echo source ${DIST_PATH}/etc/profile.d/conda.sh > /etc/profile.d/conda.sh \ +    && echo source ${DIST_PATH}/etc/profile.d/mamba.sh > /etc/profile.d/mamba.sh \ +    && source /etc/profile.d/conda.sh \ +    && source /etc/profile.d/mamba.sh \ +    && echo conda activate linux > /etc/profile.d/zconda.sh \ +    && chown -R developer: ${OPT} ${HOME} +# Configure Conda +ENV PATH "${DIST_PATH}/bin:${PATH}" +# Get delivery snapshot +ADD ${SNAPSHOT_INPUT} ${HOME}/SNAPSHOT.yml +ADD ${SNAPSHOT_PKGDIR} ${HOME}/packages +RUN chown -R developer: ${HOME} +USER developer +RUN conda config --set auto_update_conda false \ +    && conda config --set always_yes true \ +    && conda config --set quiet true \ +    && conda config --set rollback_enabled false +RUN sed -i -e "s|@CONDA_CHANNEL@|${HOME}/packages/conda|;s|@PIP_ARGUMENTS@|--extra-index-url ${HOME}/packages/wheels|;" ${HOME}/SNAPSHOT.yml +RUN mamba install \ +        git \ +        ${CONDA_PACKAGES} \ +    && mamba env create -n linux --file ${HOME}/SNAPSHOT.yml +WORKDIR ${HOME} +CMD ["/bin/bash"] diff --git a/mission/generic/generic.ini b/mission/generic/generic.ini new file mode 100644 index 0000000..e81c689 --- /dev/null +++ b/mission/generic/generic.ini @@ -0,0 +1,13 @@ +[meta] +release_fmt = %n-%v-%r-py%p-%o-%a +build_name_fmt = %n-%v-%r +build_number_fmt = %v.%r + +[template:readme.md.in] +destination = {{ storage.delivery_dir }}/README-{{ info.release_name }}.md + +;[template:release_notes.md.in] +;destination = {{ storage.delivery_dir }}/release_notes.md + +[template:Dockerfile.in] +destination = {{ storage.build_docker_dir }}/Dockerfile
\ No newline at end of file diff --git a/mission/generic/readme.md.in b/mission/generic/readme.md.in new file mode 100644 index 0000000..616034e --- /dev/null +++ b/mission/generic/readme.md.in @@ -0,0 +1 @@ +# {{ meta.name }}
\ No newline at end of file | 
