training inside docker
Some checks failed
s434742-training/pipeline/head There was a failure building this commit

This commit is contained in:
patrycjalazna 2021-05-07 18:55:51 +02:00
parent a53d4773fc
commit 367ec7d511

View File

@ -1,9 +1,6 @@
pipeline { pipeline {
agent { agent any
docker {
image 'patlaz/ium:1.0'
}
}
parameters { parameters {
buildSelector( buildSelector(
defaultSelector: lastSuccessful(), defaultSelector: lastSuccessful(),
@ -27,14 +24,22 @@ pipeline {
copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR') copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR')
} }
} }
stage('training') {
stage('docker-training') {
steps { steps {
script {
def img = docker.build('patlaz/ium:1.0')
img.inside {
sh 'chmod +x avocado-training.py' sh 'chmod +x avocado-training.py'
sh 'echo ${EPOCHS} ${BATCH_SIZE}'
sh 'python3 avocado-training.py ${EPOCHS} ${BATCH_SIZE}' sh 'python3 avocado-training.py ${EPOCHS} ${BATCH_SIZE}'
}
}
}
}
}
}
stage('archiveArtifacts') { stage('archiveArtifacts') {
steps{ steps{
archiveArtifacts 'avocado-model.h5' archiveArtifacts 'avocado-model.h5'