2023-05-12 19:44:16 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
string(name: 'EPOCHS', defaultValue: '100', description: 'Number of epochs')
|
|
|
|
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
|
|
|
|
}
|
|
|
|
stages {
|
2023-05-14 17:37:31 +02:00
|
|
|
stage('Checkout: Check out from version control') {
|
2023-05-12 22:53:58 +02:00
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's487194', url: 'https://git.wmi.amu.edu.pl/s487194/ium_487194']]])
|
|
|
|
}
|
|
|
|
}
|
2023-05-14 17:37:31 +02:00
|
|
|
stage('Docker and Training') {
|
2023-05-12 19:44:16 +02:00
|
|
|
steps {
|
|
|
|
script {
|
2023-05-14 17:10:28 +02:00
|
|
|
def dockerImage = docker.image('s487194/ium:1')
|
2023-05-14 17:37:31 +02:00
|
|
|
dockerImage.inside {
|
|
|
|
sh "python train.py --epochs ${params.EPOCHS} --lr ${params.LR}"
|
2023-05-12 20:46:27 +02:00
|
|
|
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
|
2023-05-12 19:44:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-05-14 17:38:01 +02:00
|
|
|
|
2023-05-12 19:44:16 +02:00
|
|
|
}
|
2023-05-14 17:37:31 +02:00
|
|
|
|