32 lines
806 B
Plaintext
32 lines
806 B
Plaintext
pipeline{
|
|
agent any
|
|
|
|
parameters {
|
|
string(
|
|
name: 'EPOCHS',
|
|
description: 'Number of epochs',
|
|
defaultValue: '10'
|
|
)
|
|
}
|
|
|
|
stages{
|
|
stage('Copy dataset'){
|
|
steps{
|
|
sh "docker cp \$(docker ps -l -q):/app/dane ${env.WORKSPACE}"
|
|
}
|
|
}
|
|
|
|
stage('Train model'){
|
|
steps{
|
|
sh "docker run -v ${env.WORKSPACE}/dane:/app/dane ium python3 /app/DL-model.py --epochs ${params.EPOCHS}"
|
|
}
|
|
}
|
|
|
|
stage('Archive model'){
|
|
steps{
|
|
sh "docker cp \$(docker ps -l -q):/app/model_with_data.pickle ${env.WORKSPACE}"
|
|
archiveArtifacts artifacts: 'model_with_data.pickle', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
} |