Skip to content
Snippets Groups Projects

add satpy to our buildbucket

Merged Nick Bearson requested to merge nickb-add-satpy-PR into master
+ 4
15
@@ -25,9 +25,6 @@ fi
pkg_name=cspp-geo-gridded-glm-${version}
DIST=${DIST:-"/dock"}
LMATOOLS_REF=${LMATOOLS_REF:-"minvaluegrids"}
GLMTOOLS_REF=${GLMTOOLS_REF:-"master"}
GLMTOOLS_REPOS=${GLMTOOLS_REPOS:-"https://github.com/deeplycloudy/glmtools.git"}
GGLM_REPOS=${GGLM_REPOS:-"https://gitlab.ssec.wisc.edu/cspp_geo/cspp-geo-gridded-glm.git"}
GGLM_REF=${GGLM_REF:-"master"}
MINIFY_TARBALL=${MINIFY_TARBALL:-1}
@@ -53,20 +50,11 @@ which python
conda info -a
conda list --export
echo "Version specified: ${version}"
echo "lmatools reference: ${LMATOOLS_REF}"
echo "glmtools reference: ${GLMTOOLS_REF}"
# Turn on command printing here because we don't need all of the `conda`
# internal bash commands to pollute our output
set -x
# Install glmtools and related packages
# All dependencies should have been built with the buildbucket
# Careful: Could result in missing dependencies but we want reproducibility
pip install --no-deps git+https://github.com/deeplycloudy/lmatools.git@${LMATOOLS_REF}
pip install --no-deps git+https://github.com/deeplycloudy/stormdrain.git
pip install --no-deps git+${GLMTOOLS_REPOS}@${GLMTOOLS_REF}
# get the current packages files
# if the caller mounted the repository already then use that
GGLM_DIR="/work/cspp-geo-gridded-glm/gridded_glm"
@@ -76,19 +64,20 @@ fi
# Build a tarball version of the current conda environment
# TODO: Add conda cleanup commands similar to what Polar2Grid uses to save space
conda_tb=conda_lmatools-${LMATOOLS_REF}_glmtools-${GLMTOOLS_REF}.tar.gz
conda_tb=conda_gglm.tar.gz
conda clean -ay # remove unnecessary things from conda environment
conda pack --n-threads $(nproc) -n build -o ${conda_tb}
# Build up our package directory
mkdir -p ${pkg_name}
cd ${pkg_name}
mkdir -p bin opt/conda
mkdir -p bin libexec/python_runtime
# Copy package scripts/data to package directory
cp $GGLM_DIR/PACKAGE_README.md ./README.md
cp $GGLM_DIR/bin/* ./bin/
cp $GGLM_DIR/libexec/* ./libexec/
# Untar the tarball so we can put things where we want
tar -xz -C ./opt/conda -f ../${conda_tb}
tar -xz -C ./libexec/python_runtime -f ../${conda_tb}
# Go back to original work directory
cd ..
Loading