Add Jenskins file to ML

This commit is contained in:
s487179 2023-06-11 10:54:35 +02:00
parent 73eec95e15
commit 23bb096029
4 changed files with 39 additions and 3 deletions

36
ML/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,36 @@
pipeline {
agent any
parameters {
buildSelector(
name: 'BUILD_SELECTOR',
defaultSelector: lastSuccessful(),
description: 'A build to take the artifacts from'
)
}
stages {
stage('Copy artifacts') {
steps {
script {
copyArtifacts(
projectName: 'z-s487179-create-dataset',
selector: buildParameter('BUILD_SELECTOR'),
target: './ML'
)
}
}
}
stage('Run training') {
steps {
script {
sh 'ls -l'
docker.image('docker-image').inside {
dir('./ML') {
sh 'ls -l'
sh 'python3 ./model_train.py'
}
}
}
}
}
}
}

View File

@ -38,7 +38,7 @@ pipeline {
stage('Docker') {
steps {
script {
def dockerImage = docker.build("docker-iamge", "./docker")
def dockerImage = docker.build("docker-image", "./docker")
dockerImage.inside {
sh 'ls -l'
dir ('./createDataset') {

View File

@ -23,7 +23,7 @@ pipeline {
steps {
script {
sh 'ls -l'
docker.image('docker-iamge').inside {
docker.image('docker-image').inside {
dir('./datasetStats') {
sh 'ls -l'
sh 'python3 ./datasetStats.py'

View File

@ -3,4 +3,4 @@ FROM ubuntu:latest
RUN apt-get update && \
apt-get install -y python3-pip python3-dev && \
apt-get install -y build-essential && \
pip3 install pandas kaggle seaborn scikit-learn
pip3 install pandas kaggle seaborn scikit-learn torch \