Skip to content

Instantly share code, notes, and snippets.

@robkooper
robkooper / ed.sh
Last active January 27, 2021 06:08
First use setup.sh to download and setup the folders/files, secondly run ed.sh to run ED on a specific input file.
#!/bin/bash
docker run -ti --rm \
--volume ${PWD}:/data \
--env OMP_NUM_THREADS=1 \
pecan/ed \
/usr/local/bin/ed -s -f "$@"
library(plumber)
# create the actual app
master_pr <- plumber$new()
# list of all files with endpoints, suggest to keep one file per level
# each file needs a unique endpoint
f1_pr <- plumber$new("plumber1.R")
master_pr$mount("/f1", f1_pr)
@robkooper
robkooper / api.md
Created March 3, 2020 14:59
PEcAn GSOC API

The goal of this project is to make more of PEcAn available as a REST API. Right now you will need to either use the web application or create a xml file that contains the information needed for a full workflow run. On top of that PEcAn has many other helpful functions available that are only programmatically available.

We would like for you to create an API that would allow users to interact with PEcAn from executing functions and retrieving the results, up to launching a full workflow. Using the latter we can now create a test system that will run workflows on a regular basis to test the whole of PEcAn.

Some work has already been done in the api package. I would like to make sure that we leverage of this work but I would like to propose we also use plumber which should making the RESTful API easier, and documented.

Initial Project

As a test project I would like the developer to create a small R Project that leverage

@robkooper
robkooper / ED2IN
Created February 11, 2020 20:34
Example of running ED container in singularity.
!==========================================================================================!
!==========================================================================================!
! ED2IN . !
! !
! This is the file that contains the variables that define how ED is to be run. There !
! is some brief information about the variables here. !
!------------------------------------------------------------------------------------------!
$ED_NL
!----- Simulation title (64 characters). -----------------------------------------------!
@robkooper
robkooper / DeployingClowder.md
Last active October 23, 2019 20:30
Deploying Clowder
@robkooper
robkooper / .env
Last active November 4, 2021 17:38
Deploying Clowder using Docker
# This file will override the configation options in the docker-compose
# file. Copy this file to the same folder as docker-compose as .env
# ----------------------------------------------------------------------
# GENERAL CONFIGURATION
# ----------------------------------------------------------------------
# project name (-p flag for docker-compose)
#COMPOSE_PROJECT_NAME=dev
@robkooper
robkooper / pecan-docker-install.sh
Created September 26, 2019 15:24
PEcAn installation using docker only
# this assumes a Ubuntu 18.04 VM
# run following as root
sudo -s
# install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt-get -qq update
apt-get install -y docker-ce
@robkooper
robkooper / docker-tags.md
Last active June 13, 2019 20:28
docker-tags

Docker Tags

This document will try to discuss how we use tags in docker. When assigning docker tags we leverage of knowledge both from the GIT workflow used, as well as the actual release. First the GIT Workflow used will be described, next the semantic versioning is described and finally docker tags are described.

GIT Workflow

In most of the projects we follow the git branching strategy as described in "A successful Git branching model". This describes a development model where there are two main branches (master and develop) that will always exist. All development is done on feature branches, which after a code review will be merged back into these main branches.
The master branch is the branch that contains the latest released version of the software (production ready). The develop branch contains the newest code will have all the latest features (and some of the bugs). Any new features that are developed will be merged into th

@robkooper
robkooper / .env
Created February 19, 2019 19:55
Running PEcAn in docker swarm
# This file will override the configation options in the docker-compose
# file. Copy this file to the same folder as docker-compose as .env
# ----------------------------------------------------------------------
# GENERAL CONFIGURATION
# ----------------------------------------------------------------------
# Folder to store all data
DATA_DIR=/home/kooper/pecan
@robkooper
robkooper / .env
Last active February 21, 2019 15:17
Running PEcAn in docker swarm
# This file will override the configation options in the docker-compose
# file. Copy this file to the same folder as docker-compose as .env
# ----------------------------------------------------------------------
# GENERAL CONFIGURATION
# ----------------------------------------------------------------------
# Folder to store all data
DATA_DIR=/home/kooper/pecan