Skip to content

Commit

Permalink
Get rid of complicated and unnecessary spack bits
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSimpson committed Jan 31, 2018
1 parent c592585 commit 7c5a318
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 2,010 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ docker ${DEBUG_FLAG} build -t localhost:5000/docker_image .
docker ${DEBUG_FLAG} push localhost:5000/docker_image

# Build the singularity container from the docker image
export SINGULARITY_DISABLE_CACHE=1
singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ if [[ ${GREP_RC} -eq 0 ]] ; then
export SINGULARITY_DOCKER_PASSWORD=${DOCKERHUB_READONLY_TOKEN}
fi

export SINGULARITY_DISABLE_CACHE=1
/usr/bin/unbuffer /usr/local/bin/singularity ${DEBUG_FLAG} build ./container.simg ./container.def
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ set(SOURCE_FILES_CLIENT
Common/include/ClientData.h)

# Scripts required for runtime
set(SCRIPTS
Scripts/create-builder.sh
Scripts/destroy-builder.sh
Scripts/singularity-builder-backend.sh
Scripts/docker-builder-backend.sh)
set(Provisioning
Builder/scripts/create-builder.sh
Builder/scripts/destroy-builder.sh
Builder/scripts/singularity-builder-backend.sh
Builder/scripts/docker-builder-backend.sh)

# Create executables
add_executable(builder-queue ${SOURCE_FILES_QUEUE})
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 23 additions & 32 deletions deploy-titan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,38 @@ set -o xtrace

VERSION=$1

export HOME=$(pwd)
export TOP_LEVEL=$(pwd)

source ${MODULESHOME}/init/bash
export PATH=$PATH:${MODULESHOME}/bin

module unload xalt PrgEnv-pgi PrgEnv-gnu PrgEnv-intel PrgEnv-cray
module unload xalt
module unload PrgEnv-pgi
module load gcc

set -x

unset CRAYPE_VERSION
SW_ROOT=/sw/xk6/container-builder/${VERSION}
mkdir -p ${SW_ROOT}

# Build with spack; install spack if it's not already present.
SPACKROOT=${SW_ROOT}/.spack
if [ ! -d ${SPACKROOT} ]; then
git clone https://github.com/spack/spack.git ${SPACKROOT}
cd ${SPACKROOT}
git checkout d3519af7de84fa72dee0618c7754f7ebeaa23142
cd ${HOME}
fi
mkdir boost_install && cd boost_install

# Update the spack configuration files to the latest.
cp spack-etc-titan/*.yaml ${SPACKROOT}/etc/spack
# Install boost
cd ${TOP_LEVEL}
mkdir build && cd build
curl -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz -O
tar xf boost_1_66_0.tar.gz
cd ${TOP_LEVEL}/boost_1_66_0
./bootstrap.sh --with-libraries=filesystem,regex,system,serialization,thread,program_options --prefix=${SW_ROOT}
./b2 install || :
rm -rf /boost_1_66_0

# Ensure spack is aware of our third-party package repo.
${SPACKROOT}/bin/spack repo add spack-repo/container-builder
# Install container-builder
cd ${TOP_LEVEL}
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${SW_ROOT} ..

# Remove any remnants of past failed builds.
${SPACKROOT}/bin/spack clean --stage --misc-cache

# Record how spack will build the app in the log.
${SPACKROOT}/bin/spack spec -NIl "container-builder%gcc@5.3.0"

# Have spack build the app.
${SPACKROOT}/bin/spack install "container-builder%gcc@5.3.0"

# Find where spack generated the modulefile.
root=$(${SPACKROOT}/bin/spack config get config | grep "\btcl:" | awk '{print $2}' | sed 's/^$spack/./')
arch=$(${SPACKROOT}/bin/spack arch)
mfname=$(${SPACKROOT}/bin/spack module find "container-builder%gcc@5.3.0")
real_mf_path="$SPACKROOT/$root/$arch/$mfname"

# Generate a public modulefile the loads the spack-generated one.
# Generate a public modulefile
MF_ROOT=/sw/xk6/modulefiles/container-builder
mkdir -p ${MF_ROOT}

Expand All @@ -60,5 +48,8 @@ cat << EOF > ${MF_ROOT}/${VERSION}
setenv QUEUE_HOST ${QUEUE_HOST}
setenv QUEUE_PORT 8080
module load ${real_mf_path}
EOF
module load load gcc
prepend-path LD_LIBRARY_PATH ${SW_ROOT}/lib
prepend-path PATH ${SW_ROOT}/bin
EOF
19 changes: 0 additions & 19 deletions spack-etc-summitdev/compilers.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions spack-etc-titan/compilers.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions spack-repo/README.md

This file was deleted.

1 change: 0 additions & 1 deletion spack-repo/container-builder/.gitignore

This file was deleted.

Loading

0 comments on commit 7c5a318

Please sign in to comment.