From 796df44dde12e58c0df5049b8c963f9656294e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Ga=C5=82=C4=85zkiewicz?= Date: Mon, 6 Jun 2022 01:19:43 +0200 Subject: [PATCH] Zad 10. DVC - Jenkinsfile_dvc and Dockerfile --- Jenkinsfile_dvc | 30 ++++++++++++++++++++++++++++++ dvc/Dockerfile | 16 ++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Jenkinsfile_dvc create mode 100644 dvc/Dockerfile diff --git a/Jenkinsfile_dvc b/Jenkinsfile_dvc new file mode 100644 index 0000000..390e9ec --- /dev/null +++ b/Jenkinsfile_dvc @@ -0,0 +1,30 @@ +pipeline { + agent { + dockerfile{ + dir 'dvc' + } + } + + stages { + stage('checkout'){ + steps{ + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's470623', url: 'https://git.wmi.amu.edu.pl/s470623/ium_470623.git']]]) + } + } + + stage("DVC"){ + steps { + 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 remote modify --local ium_ssh_remote password IUM@2021' + sh 'dvc remote list' + sh 'cat .dvc/config' + sh 'cat .dvc/config.local' + sh 'dvc pull' + sh 'dvc reproduce' + sh 'ls -al' + } + } + } + } +} \ No newline at end of file diff --git a/dvc/Dockerfile b/dvc/Dockerfile new file mode 100644 index 0000000..85a79d5 --- /dev/null +++ b/dvc/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:latest + +RUN apt update && apt install -y python3-pip +RUN apt install -y unzip python3 +RUN apt install -y sshpass openssh-client +RUN pip3 install pandas numpy sklearn tensorflow matplotlib +RUN pip3 install dvc +RUN pip3 install dvc[ssh] paramiko + +WORKDIR /ium + +RUN useradd -r -u 111 jenkins + +#CMD ./download_dataset.sh +#CMD python3 process_dataset.py +#CMD ./stats.sh \ No newline at end of file