ium_z487175/Jenkinsfile-training

31 lines
710 B
Plaintext
Raw Normal View History

2023-06-07 20:00:19 +02:00
pipeline{
agent any
2023-06-07 20:17:28 +02:00
parameters {
string(
name: 'EPOCHS',
description: 'Number of epochs',
defaultValue: '10'
)
}
2023-06-07 20:00:19 +02:00
stages{
stage('Copy dataset'){
steps{
sh "docker cp \$(docker ps -l -q):/app/dane ${env.WORKSPACE}"
}
}
stage('Train model'){
steps{
2023-06-07 20:50:13 +02:00
sh "docker run -v ${env.WORKSPACE}/dane:/app/dane ium python3 /app/DL-model.py --epochs ${params.EPOCHS}"
2023-06-07 20:00:19 +02:00
}
}
stage('Archive model'){
steps{
archiveArtifacts artifacts: 'model_with_data.pickle', fingerprint: true
}
}
}
}