jenkins train model

This commit is contained in:
Alicja Szulecka 2024-04-14 12:58:46 +02:00
parent e8a48f51f3
commit 821d0d7e9c
2 changed files with 12 additions and 1 deletions

View File

@ -8,4 +8,4 @@ RUN pip3 install kaggle pandas scikit-learn
WORKDIR /app
COPY IUM_2.py ./
COPY IUM_2.py model.py prediction.py ./

11
Jenkinsfile vendored
View File

@ -35,5 +35,16 @@ pipeline {
}
}
}
stage('Train and Predict') {
steps {
def customImage = docker.build("custom-image")
customImage.inside {
sh 'python3 ./model.py'
sh 'python3 ./prediction.py'
archiveArtifacts artifacts: 'model.pth, predictions.txt', onlyIfSuccessful: true
}
}
}
}
}