From 627b05f12b15c1a545a429fe4ec371acf862f1d4 Mon Sep 17 00:00:00 2001 From: wikbom Date: Wed, 10 May 2023 15:31:09 +0200 Subject: [PATCH] adding scripts to jenkinsfile --- Jenkinsfile | 8 +++++--- dockerfile | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f97aaa..9822047 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ node { - checkout scm - def dockerimage = docker.build("titanic-image") - dockerimage.inside { + checkout scm + def dockerimage = docker.build("titanic-image", "./dockerfile") + dockerimage.inside { stage('Preparation') { properties([ parameters([ @@ -29,6 +29,7 @@ node { "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) { sh "./script.sh ${CUTOFF}" + sh "./learning.py" } } @@ -37,6 +38,7 @@ node { stage('artifacts') { echo 'saving artifacts' archiveArtifacts 'output.txt' + archiveArtifacts 'model.pt' } } } diff --git a/dockerfile b/dockerfile index 94c338e..981c83b 100644 --- a/dockerfile +++ b/dockerfile @@ -7,6 +7,10 @@ RUN apt install git -y RUN pip install --user kaggle RUN pip install --user pandas +RUN pip install --user torch +RUN pip install --user keras +RUN pip install --user tensorflow +RUN pip install --user scikit-learn RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle ENV PATH="$PATH:~/.local/bin/kaggle" @@ -16,5 +20,7 @@ ENV KAGGLE_KEY="" # RUN echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc COPY ./script.sh ./ +COPY ./learning.py ./ -# CMD ./script.sh 300 \ No newline at end of file +# CMD ./script.sh 300 +# CMD ./learning.py \ No newline at end of file