update dockerfile and add dvc.yaml, jenkinsfile_dvc
Some checks are pending
s444356-evaluation/pipeline/head Build queued...
s444356-training/pipeline/head Build queued...

This commit is contained in:
Maciej Czajka 2022-06-02 22:52:54 +02:00
parent ea35c610b6
commit b735799bd1
4 changed files with 49 additions and 0 deletions

1
.gitignore vendored
View File

@ -150,3 +150,4 @@ crashlytics.properties
crashlytics-build.properties
fabric.properties
/games_model.pkl

View File

@ -42,4 +42,9 @@ COPY registry.py .
COPY Biblioteka_DL/all_games.csv .
RUN ./download.sh $CUTOFF
RUN pip3 install dvc
RUN pip3 install dvc[ssh] paramiko
RUN apt install -y sshpass openssh-client
RUN useradd -r -u 111 jenkins
#CMD ["python3", "./dllib.py"]

31
Jenkinsfile_dvc Normal file
View File

@ -0,0 +1,31 @@
pipeline {
agent {
docker {
image 'maciejczajka'
}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts for predict',
name: 'BUILD_SELECTOR')
string(
defaultValue: '{\\"inputs\\": [900.0]}',
description: 'Input file',
name: 'INPUT',
trim: true
)
}
stages {
stage("DVC"){
sh 'git clone https://git.wmi.amu.edu.pl/s444356/ium_s444356.git'
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
sh 'dvc pull'
sh 'dvc repro'
sh 'ls -al'
}
}
}
}

12
dvc.yaml Normal file
View File

@ -0,0 +1,12 @@
stages:
train:
cmd: python3 ./Biblioteka_DL/dllib.py 100
deps:
- all_games.train.csv
outs:
- games_model.pkl
evaluate:
cmd: python3 ./Biblioteka_DL/evaluate.py
deps:
- all_games.train.csv
- games_model.pkl