Skip to content
main
Go to file
Code

Files

Permalink
Failed to load latest commit information.

ReadMe.md

CLASS Examples

OSG Container

Example based on the OSG example (https://docs.ligo.org/lscsoft/bayeswave/running.html) of BayesWave (https://git.ligo.org/lscsoft/bayeswave).

Using a Pre-Built Container on Docker

sudo apt install cmake -y
cd projects
git clone https://git.ligo.org/lscsoft/bayeswave
cd bayeswave
docker build -t conda-env --file .conda-env.Dockerfile .
docker build -t bayeswave --build-arg BUILD_IMAGE=conda-env:latest ./

Simple test example

docker run -it --rm bayeswave:latest -- BayesWave \
    --ifo H1 --H1-flow 32 \
    --H1-cache LALSimAdLIGO --H1-channel LALSimAdLIGO \
    --trigtime 900000000.00 --srate 512 --seglen 4 --PSDstart 900000000 \
    --PSDlength 1024 --NCmin 2 --NCmax 2 --dataseed 1234 \
    --Niter 500 --outputDir master-test

Setup login credentials using a "personal access token" stored in the file token in the following form:

REGISTRY_NAME="registry DNS name e.g. ghcr.io"
REGISTRY_TOKEN="personal access token"
REGISTRY_USER="user"
. ./token
echo $REGISTRY_TOKEN | docker login $REGISTRY_NAME -u $REGISTRY_USER --password-stdin

Push container to the registry.

. ./token
docker tag conda-env:latest $REGISTRY_NAME/$REGISTRY_USER/conda-env:latest
docker push $REGISTRY_NAME/$REGISTRY_USER/conda-env:latest
docker tag bayeswave:latest $REGISTRY_NAME/$REGISTRY_USER/bayeswave:latest
docker push $REGISTRY_NAME/$REGISTRY_USER/bayeswave:latest

Store token in Kubernetes cluster

kubectl create secret docker-registry registry-secret --docker-server="$REGISTRY_NAME" --docker-username="$REGISTRY_USER" --docker-password="$REGISTRY_TOKEN" 

Deploy container as a Job. Assumes working kubectl and a default namespace. Note the evnsubst replaces the envrionment variables with their values.

. ./token
export REGISTRY_NAME REGISTRY_USER
cat bayeswave.yaml | envsubst | kubectl apply -f -

About

CLASS Examples

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.