add multipieline project
Some checks failed
s440058-training/pipeline/head There was a failure building this commit
Some checks failed
s440058-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
254da57d4b
commit
bdc4ccdf9b
6
lab06/Dockerfile
Normal file
6
lab06/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FROM ubuntu:latest
|
||||||
|
RUN apt-get update && apt-get install -y python3-pip && pip3 install setuptools && pip3 install numpy && pip3 install pandas && pip3 install wget && pip3 install scikit-learn && pip3 install matplotlib && rm -rf /var/lib/apt/lists/*
|
||||||
|
RUN pip3 install torch torchvision torchaudio
|
||||||
|
RUN pip3 install sacred && pip3 install GitPython && pip3 install pymongo
|
||||||
|
WORKDIR /app
|
||||||
|
COPY ./../pytorch-example.py ./
|
52
lab06/jenkinsfile-train
Normal file
52
lab06/jenkinsfile-train
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile true
|
||||||
|
}
|
||||||
|
parameters{
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'WHICH_BUILD'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '16',
|
||||||
|
description: 'batch size',
|
||||||
|
name: 'BATCH_SIZE'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '15',
|
||||||
|
description: 'epochs',
|
||||||
|
name: 'EPOCHS'
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('checkout') {
|
||||||
|
steps {
|
||||||
|
copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('WHICH_BUILD')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Docker'){
|
||||||
|
steps{
|
||||||
|
sh 'python3 "./pytorch-example.py" ${BATCH_SIZE} ${EPOCHS} > pred.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('archiveArtifacts') {
|
||||||
|
steps{
|
||||||
|
archiveArtifacts 'ium_s440058/**'
|
||||||
|
archiveArtifacts 'pred.txt'
|
||||||
|
archiveArtifacts 'diabetes.pkl'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
mail body: 'SUCCESS TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
failure {
|
||||||
|
mail body: 'FAILURE TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user