Jenkinsfile for 6_1 training

This commit is contained in:
Grzegorz Gapiński 2023-05-12 23:40:19 +02:00
parent f46f5dffec
commit ce5ede88f6

37
Jenkinsfile6_1 Normal file
View File

@ -0,0 +1,37 @@
pipeline {
agent {
docker {
image 'python:3.11'
args '-v /root/.cache:/root/.cache -u root -v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns'
}
}
parameters {
string(name: 'EPOCHS', defaultValue: '10', description: 'Liczba Epok')
}
stages {
stage('Przygotowanie) {
steps {
sh 'pip install pandas tensorflow numpy scikit-learn mlflow'
}
}
stage('Pobierz dane') {
steps {
script {
copyArtifacts(projectName: 's407409-create-dataset', fingerprintArtifacts: true)
}
}
}
stage('Trenuj model') {
steps {
script {
sh "python3 model_train.py"
}
}
}
stage('Zarchiwizuj model') {
steps {
archiveArtifacts artifacts: 'model_election.h5', fingerprint: true
}
}
}
}