Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…sis3 into hyradus
  • Loading branch information
Hyradus committed Mar 28, 2022
2 parents 49418e6 + 92c96b8 commit a76c081
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
5 changes: 3 additions & 2 deletions Installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ do
shift 2
;;
-h | --help)
echo -e "This is a script to build standalone docker-isis5-asp3-gispy + jupyter lab or jupyterhub with dockerspawner isis5asp3-gispy:
echo -e "This is a script to build standalone docker-isis5-asp3-gispy + jupyter lab or jupyterhub with dockerspawner isis5asp3-gispy:lab:
\nDefaut JUPYTERHUB+dockerspawner!
\n-n to install Standalone"
\n'-jhub -n' to install Standalone"
exit 2
;;
--)
Expand Down Expand Up @@ -54,6 +54,7 @@ if [[ $jhub =~ ^[Yy1]$ ]]
sleep 2
./scripts/ImageBuilder.sh
docker-compose --f docker-compose.yml --env-file .env build

else
./scripts/ImageBuilder.sh
fi
55 changes: 29 additions & 26 deletions scripts/ImageBuilder.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#!/bin/bash

gispy="y"
SHORT=G:,g:,h
LONG=GISPY:,gispy:,help
jupyter="y"
SHORT=J:,j:,G:,g:,h
LONG=JUPYTER:,jupyter:,help
OPTS=$(getopt -a -n jupyterhub --options $SHORT --longoptions $LONG -- "$@")
eval set -- "$OPTS"
while :
do
case "$1" in
-G | --JUPYTER )
gispy="$2"
-J | --JUPYTER )
jupyter="$2"
shift 2
;;
-g | --jupyter )
gispy="$2"
-j | --jupyter )
jupyter="$2"
shift 2
;;
-h | --help)
echo -e "This is a script to build docker-isis-asp + jupyter:
\n-j to install jupyter - default: $gispy"
\n-j to install jupyter - default: $jupyter
\n-g to install gispy - default: $gispy"
exit 2
;;
--)
Expand All @@ -44,23 +45,25 @@ ISIS_IMAGE="isis5-asp3:base"

echo "ISIS version $ISIS_VERSION will be installed"
echo "NASA_Ames Stereo Pipeline 3.0.0 will be installed"
echo "GIS-python install: $gispy"
echo "Jupyter + GIS-python install: $jupyter"

if [[ $jupyter =~ ^[Yy1]$ ]]
then
JUPYTER_GISPY_IMAGE="jupyter-gispy:gdal"
docker build -t "$JUPYTER_GISPY_IMAGE" \
-f $PWD/dockerfiles/$GISPY_DOCKERFILE .
BASE_IMAGE=$JUPYTER_GISPY_IMAGE
ISIS_IMAGE="isis5-asp3-gispy:lab"
else
JUPYTER_ENABLE_LAB='no'
fi
if [[ $jupyter =~ ^[Yy1]$ ]]
then
BASE_IMAGE="jupyter/base-notebook:lab-3.2.8"
JUPYTER_GISPY_IMAGE="jupyter-gispy:gdal"
docker build -t "$JUPYTER_GISPY_IMAGE" \
--build-arg BASE_IMAGE="$BASE_IMAGE" \
-f $PWD/dockerfiles/$GISPY_DOCKERFILE .
BASE_IMAGE=$JUPYTER_GISPY_IMAGE
ISIS_IMAGE="isis5-asp3-gispy:lab"
else
JUPYTER_ENABLE_LAB='no'
fi

echo "Creating $ISIS_IMAGE image"
docker build -t "$ISIS_IMAGE" \
--build-arg BASE_IMAGE="$BASE_IMAGE" \
--build-arg ISIS_VERSION="$ISIS_VERSION" \
--build-arg ASP_VERSION="$ASP_VERSION" \
-f $PWD/dockerfiles/$DOCKERFILE .
[ $? ] && echo "Docker image $ISIS_IMAGE built."
echo "Creating $ISIS_IMAGE image"
docker build -t "$ISIS_IMAGE" \
--build-arg BASE_IMAGE="$BASE_IMAGE" \
--build-arg ISIS_VERSION="$ISIS_VERSION" \
--build-arg ASP_VERSION="$ASP_VERSION" \
-f $PWD/dockerfiles/$DOCKERFILE .
[ $? ] && echo "Docker image $ISIS_IMAGE built."

0 comments on commit a76c081

Please sign in to comment.