Commit 9ae16e9a authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

Merge branch 'dev_newci' into 'master'

New CI flow

See merge request !71
parents 88c1eadc 26129c9b
Pipeline #230590 passed with stages
in 6 minutes and 53 seconds
variables:
# python dependencies
CONDA_ENVS: ".conda"
CLI_CONDA_ENV: "$CONDA_ENVS/cli.env"
SCORER_CONDA_ENV: "$CONDA_ENVS/scorer.env"
# necessary files for execution
NIST_FILES: "./test/test_validate_execution/resources"
FILE_INDEX: "$NIST_FILES/file-index.json"
ACTIVITY_INDEX: "$NIST_FILES/activity-index.json"
VIDEOS_DIR: ./videos
# system cache dir for simulation pipeline
SYSTEM_CACHE_DIR: ".scache"
CHUNKS_FILE: "$SYSTEM_CACHE_DIR/chunks-file.json"
PROPOSAL_OUTPUT: "$SYSTEM_CACHE_DIR/proposal.out"
LOCALIZATION_OUTPUT: "$SYSTEM_CACHE_DIR/localization.json"
SYSTEM_OUTPUT: "$SYSTEM_CACHE_DIR/sysout.json"
# get-system needs
CLI_URL: "https://gitlab.kitware.com/actev/diva_evaluation_cli.git"
default:
image: continuumio/anaconda3
stages:
- check-branch
- conda-test
reject:other:branches:
stage: check-branch
script:
- if [[ $CI_PIPELINE_SOURCE != "push" ]];then exit 1; fi
- if [[ $CI_COMMIT_BRANCH =~ ^(master|baseline_master|placebo|(dev_.*))$ ]] && [[ ! $CI_COMMIT_BRANCH =~ ^dev_(placebo|baseline)$ ]];then exit 0; else echo "Branch name is invalid."; exit 1; fi
master:conda:oneshot:
stage: conda-test
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
before_script:
# only master, and dev_<feature>
- git submodule init
- git submodule update
- export PATH=$PATH:~/.local/bin
- mkdir -p $VIDEOS_DIR $CONDA_ENVS $SYSTEM_CACHE_DIR
- echo "avi content here" > $VIDEOS_DIR/test-video.avi
- apt-get update -y
- apt install -y libgl1-mesa-glx
script:
# init
- conda env create -f environment.yml -p $CLI_CONDA_ENV
- conda env create -f diva_evaluation_cli/bin/private_src/implementation/validate_execution/ActEV_Scorer/environment.yml -p $SCORER_CONDA_ENV
- conda init bash
- source ~/.bashrc
- conda activate $CLI_CONDA_ENV
- python3 setup.py develop --prefix $CLI_CONDA_ENV
- actev -h
### SIMULATION ###
- echo "Starting pipeline simulation"
# get-system
- echo "actev get-system"
- actev get-system git -u $CLI_URL -l . -n placebo -s placebo
- rm -rf diva_evaluation/src
- cp -R placebo/diva_evaluation_cli/src/* diva_evaluation_cli/src
- rm -rf diva_evaluation/container_output
- cp -R placebo/diva_evaluation_cli/container_output/* diva_evaluation_cli/container_output
- conda env update -f placebo/environment.yml -p $CLI_CONDA_ENV
- cp placebo/LICENSE.txt ./
# validate-system
- echo "actev validate-system"
- actev validate-system --strict
# system-setup
- echo "actev system-setup"
- actev system-setup
# train-system
- echo "actev train-system"
- echo "TODO actev train-system -a $TRAINING_ACTIVITY_INDEX -t $TRAINING_DIR"
# design-chunks
- echo "actev design-chunks"
- actev design-chunks -f $FILE_INDEX -a $ACTIVITY_INDEX -o $CHUNKS_FILE -n 1
# experiment-init
- echo "actev experiment-init"
- actev experiment-init -f $FILE_INDEX -a $ACTIVITY_INDEX -c $CHUNKS_FILE -v $VIDEOS_DIR -s $SYSTEM_CACHE_DIR --prepare-proposal-outputs --prepare-localization-outputs
# process-chunk
- echo "actev (pre/post)process-chunk"
- actev pre-process-chunk -i Chunk0 -s $SYSTEM_CACHE_DIR
- actev process-chunk -i Chunk0 -s $SYSTEM_CACHE_DIR
- actev post-process-chunk -i Chunk0 -s $SYSTEM_CACHE_DIR
# merge-chunks
- echo "actev merge-chunks"
- actev merge-chunks -c $CHUNKS_FILE -s $SYSTEM_CACHE_DIR -o $SYSTEM_OUTPUT -p $PROPOSAL_OUTPUT -l $LOCALIZATION_OUTPUT
# validate-execution
- echo "actev validate-execution"
- actev validate-execution -f $FILE_INDEX -a $ACTIVITY_INDEX -o $SYSTEM_OUTPUT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment