ium_487194/Jenkins_train

22 lines
694 B
Plaintext

pipeline {
agent any
parameters {
string(name: 'EPOCHS', defaultValue: '100', description: 'Number of epochs')
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
}
stages {
stage('Docker and Training'){
steps {
script {
def dockerImage = docker.image('s487194/ium:lab5_6')
dockerImage.inside {
sh "python train.py -epochs ${params.EPOCHS} -lr ${params.LR}"
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
}
}
}
}
}
}