new branch

This commit is contained in:
s434695 2021-05-15 17:01:54 +02:00
parent 4fd893ab8b
commit e92325d5f5
5 changed files with 64 additions and 38 deletions

View File

@ -5,6 +5,7 @@ FROM ubuntu:latest
RUN apt update && apt install -y figlet RUN apt update && apt install -y figlet
RUN apt install -y git RUN apt install -y git
RUN apt install -y python3-pip RUN apt install -y python3-pip
RUN pip3 install --user setuptools
RUN pip3 install --user kaggle RUN pip3 install --user kaggle
RUN pip3 install --user pandas RUN pip3 install --user pandas
RUN pip3 install --user numpy RUN pip3 install --user numpy
@ -12,13 +13,19 @@ RUN pip3 install --user seaborn
RUN pip3 install --user sklearn RUN pip3 install --user sklearn
RUN pip3 install --user matplotlib RUN pip3 install --user matplotlib
RUN pip3 install --user tensorflow RUN pip3 install --user tensorflow
RUN pip3 install --user sacred
RUN pip3 install --user wget RUN pip3 install --user wget
RUN pip3 install --user keras
RUN pip3 install --user GitPython
RUN pip3 install --user pymongo
WORKDIR /app WORKDIR /app
COPY ./train.py ./
COPY ./evaluate.py ./
COPY ./sacred1.py ./
COPY ./sacred2.py ./
COPY ./skrypt.sh ./ COPY ./skrypt.sh ./
COPY ./zadanie2.py ./ COPY ./zadanie2.py ./
COPY ./zadanie5.py ./ COPY ./zadanie5.py ./
CMD ./zadanie2.py
CMD ./zadanie5.py

67
Jenkinsfile vendored
View File

@ -1,40 +1,59 @@
pipeline { pipeline {
agent { agent any;
dockerfile true
} parameters{
//Definijuemy parametry, które będzie można podać podczas wywoływania zadania buildSelector(
parameters { defaultSelector: lastSuccessful(),
string ( description: 'Which build to use for copying artifacts',
defaultValue: '10000', name: 'WHICH_BUILD'
description: 'Obcięcie zbioru', )
name: 'CUTOFF', string(
trim: false defaultValue: '16',
description: 'batch size',
name: 'BATCH_SIZE'
)
string(
defaultValue: '15',
description: 'epochs',
name: 'EPOCHS'
) )
} }
stages { stages {
stage('Test') { stage('checkout') {
steps { steps {
sh 'cat /etc/issue' copyArtifacts fingerprintArtifacts: true, projectName: 's434695-create-dataset', selector: buildParameter('WHICH_BUILD')
} }
} }
stage('checkout: Check out from version control') { stage('docker-training') {
steps { steps {
git credentialsId: 'f746c8e0-e974-4758-838d-1920a7b0e3dc', url: 'https://git.wmi.amu.edu.pl/s434695/ium_434695.git' script {
def img = docker.build('shroomy/ium2:1')
img.inside {
sh "python3 train.py"
sh "python3 sacred1.py"
sh "python3 sacred2.py"
} }
} }
stage('sh: Shell Script') {
steps {
sh 'chmod +x skrypt.sh'
sh './skrypt.sh ${CUTOFF}'
} }
} }
stage('Artifacts') { stage('archiveArtifacts') {
steps { steps{
archiveArtifacts 'test.csv' archiveArtifacts 'ium_s434695/**'
archiveArtifacts 'dev.csv' archiveArtifacts 'model1'
archiveArtifacts 'train.csv'
archiveArtifacts 'obcietedane.csv'
} }
} }
} }
post {
success {
build job: 's434695-evaluation/master'
mail body: 'SUCCESS TRAINING', subject: 's434695', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
mail body: 'FAILURE TRAINING', subject: 's434695', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
} }

0
sacred1.py Normal file → Executable file
View File

0
sacred2.py Normal file → Executable file
View File

0
train.py Normal file → Executable file
View File