FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f8700ca8 authored by L. Bower's avatar L. Bower
Browse files

removing files committed in error

parent 90ae3006
No related branches found
No related tags found
No related merge requests found
# syntax=docker/dockerfile:1
FROM ubuntu:24.04 as base_image
SHELL ["/bin/bash", "-c"]
#install system packages
#RUN apt-get update;apt-get install --assume-yes python3.11 python3.11-venv wget unzip emacs gdal-bin libgdal-dev build-essential gfortran zlib1g zlib1g-dev libbz2-dev apt-utils liblzma-dev libcurl4-openssl-dev default-jre openssh-server libfribidi-dev libfontconfig1-dev libspatialindex-dev git dos2unix nano rsync;
RUN echo "alias e='emacs -nw $1'" >> ~/.bashrc;
RUN alias ll="ls -ltr"
#sets the timezone to London
#RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
#these usernames and ids match the production server (IaaS), override when building a local image if needed
ARG GNAME=ews
ARG UNAME=ewsmanager
ARG UID=1006
ARG GID=1008
#RUN groupadd -g $GID $GNAME
#RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
#run mkdir as root
RUN mkdir -p /storage/app/EWS_prod/regions/EastAfrica/workspace
RUN mkdir -p /storage/app/EWS_prod/regions/SouthAsia/workspace
#RUN chown -R $UNAME /storage
#swith to the user before installing stuff
#USER $UNAME
WORKDIR /home
#copy resources in
COPY ./requirements.txt .
#build the venv
#RUN python3.11 -m venv /storage/app/EWS_prod/envs/venv/ews_prod
#RUN source /storage/app/EWS_prod/envs/venv/ews_prod/bin/activate;pip install -r requirements.txt
RUN echo $PYTHONPATH
WORKDIR /home/ewsmanager
docker run -it -v "/media/scratch/lb584_scratch/projects/ews_aws/code:/storage/app/EWS_prod/code" -v "/media/scratch/lb584_scratch/projects/ews_aws/regions:/storage/app/EWS_prod/regions" -v "/media/scratch/lb584_scratch/projects/ews_aws/envs/credentials:/storage/app/EWS_prod/envs/credentials" -v "/media/scratch/lb584_scratch/projects/ews_aws/sftp:/storage/sftp" -v "/media/scratch/lb584_scratch/projects/ews_aws/webdata:/storage/moved/" -w "/storage/app/EWS_prod/code/" --name ews_runner ews_coordinator
#!/bin/bash
set -e
upload=''
islive=''
clearup=''
component='not_set'
config='/media/scratch/lb584_scratch/projects/ews_aws/resources/coordinator/configs/config_EastAfrica_fc_live.json' # default
rundate=$(date '+%Y%m%d') # default today
SHORT=p:c:s:h
LONG=component:,config:,rundate:,noupload::,islive::,clearup::,help
OPTS=$(getopt -a --options $SHORT --longoptions $LONG -- "$@")
echo $OPTS
eval set -- "$OPTS"
while :
do
case "$1" in
-p | --component )
component="$2"
shift 2
;;
-c | --config )
config="$2"
shift 2
;;
-s | --rundate )
rundate="$2"
shift 2
;;
--noupload )
upload="--noupload"
shift 2;
;;
--islive )
islive="--islive"
shift 2;
;;
--clearup )
clearup="--clearup"
shift 2;
;;
-h | --help)
"This is a launch script, example usage: runDockerEWS.sh -p Deposition -c -c /<path>/config_EastAfrica_fc_live.json -s 20220808"
exit 2
;;
--)
shift;
break
;;
*)
echo "Unexpected option: $1"
;;
esac
done
function run_coordinator() {
printf "component: %s\nconfig: %s\nrundate: %s\n" "$component" "$config" "$rundate"
printf "optional args:\n%s\n" "$upload $islive $clearup"
docker container ls;
docker exec \
ews_runner \
/storage/app/EWS_prod/code/coordinator/scripts/run_Processor.sh \
-p "$component" \
-c "$config" \
-s "$rundate" \
$upload \
$islive \
$clearup;
exit $?;
}
run_coordinator
exit $?
#!/bin/bash
set -e
upload=''
islive=''
clearup=''
component='not_set'
config='/media/scratch/lb584_scratch/projects/ews_aws/resources/coordinator/configs/config_EastAfrica_fc_live.json' # default
rundate=$(date '+%Y%m%d') # default today
SHORT=p:c:s:h
LONG=component:,config:,rundate:,noupload::,islive::,clearup::,help
OPTS=$(getopt -a --options $SHORT --longoptions $LONG -- "$@")
echo $OPTS
eval set -- "$OPTS"
while :
do
case "$1" in
-p | --component )
component="$2"
shift 2
;;
-c | --config )
config="$2"
shift 2
;;
-s | --rundate )
rundate="$2"
shift 2
;;
--noupload )
upload="--noupload"
shift 2;
;;
--islive )
islive="--islive"
shift 2;
;;
--clearup )
clearup="--clearup"
shift 2;
;;
-h | --help)
"This is a launch script, example usage: runDockerEWS.sh -p Deposition -c -c /<path>/config_EastAfrica_fc_live.json -s 20220808"
exit 2
;;
--)
shift;
break
;;
*)
echo "Unexpected option: $1"
;;
esac
done
function run_coordinator() {
printf "component: %s\nconfig: %s\nrundate: %s\n" "$component" "$config" "$rundate"
printf "optional args:\n%s\n" "$upload $islive $clearup"
docker container ls;
docker exec \
ews_runner \
sh -c /storage/app/EWS_prod/code/coordinator/scripts/run_Processor.sh \
-p "$component" \
-c "$config" \
-s "$rundate" \
$upload \
$islive \
$clearup;
exit $?;
}
run_coordinator
exit $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment