Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Script recalcul calque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ERASME
Script recalcul calque
Commits
4f303cb5
Commit
4f303cb5
authored
2 years ago
by
Pierre-Gilles Levallois
Browse files
Options
Downloads
Patches
Plain Diff
Python script is ready now
parent
c29251b6
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!5
Db dump
,
!4
Architecture OpenShift pour le recalcul
Pipeline
#45138
passed
2 years ago
Stage: Build Calqul
Stage: Deploy Calqul
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfiles/python/scripts/launch.sh
+13
-40
13 additions, 40 deletions
Dockerfiles/python/scripts/launch.sh
with
13 additions
and
40 deletions
Dockerfiles/python/scripts/launch.sh
+
13
−
40
View file @
4f303cb5
...
@@ -40,53 +40,26 @@ check () {
...
@@ -40,53 +40,26 @@ check () {
fi
;
fi
;
}
}
################################################################################
stage
"Launch Initializations..."
# mkdir -p $data_dir
# stage "Check source files in $data_dir"
# cd $data_dir
# current_commit=$(git rev-parse --short HEAD)
# if [ $? -eq 128 ]; then
# comment "Data repository is empty. Is this your first time, young Padawan ?"
# comment "Cloning repo, it can take a while..."
# cd ..
# git clone $DATA_REPO
# need_update=0
# else
# comment "Current commit is $current_commit"
# cd $data_dir
# fi;
# # Checking for update...
# [ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | sed 's/\// /g') | cut -f1) ] && need_update=0 || need_update=1
# if [ $need_update -eq 0 ]; then
# # We are up to date
# comment "\e[32mData are up to date."
# else
# comment "\e[93mNew version of source data is available !\e[39m"
# git pull origin main
# new_commit=$(git rev-parse --short HEAD)
# comment "New commit is : \e[93m'$new_commit'\e[39m"
# git diff --compact-summary $current_commit $new_commit
# fi;
stage
"Launch computations..."
cd
$scripts_dir
cd
$scripts_dir
comment
"Init communes"
comment
"Init communes"
python3 main.py initCommunes
python3 main.py initCommunes
comment
"Init Grid"
python3 main.py initGrid
python3 main.py initGrid 5
comment
"InitDatas"
python3 main.py initDatas
python3 main.py initDatas
# Multiprocessing task
# python3 main.py computeFactors
# python3 main.py computeIndices
stage
"Launch Computations..."
comment
"Computing factors"
python3 main.py computeFactors
# Possibly Multiprocessing task, Should have a list of townships
comment
"Computing Indices"
python3 main.py computeIndices
# Launching everything, it is possible to give a list of township
# Launching everything, it is possible to give a list of township
s
# python3 main.py computeAll
# python3 main.py computeAll
stage
"Sleeping a while for debug purpose..."
stage
"Sleeping a while for debug purpose..."
sleep
300
sleep
3600
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment