From 2fafab89c044ef50d8238687187651c6b295211e Mon Sep 17 00:00:00 2001 From: s444417 Date: Wed, 6 Apr 2022 18:55:31 +0200 Subject: [PATCH] add dataset --- Dockerfile | 18 ++++-------------- Jenkinsfile | 4 ++-- startscript1.sh | 2 +- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index cdc1e3a..fd85e80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ -# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest FROM ubuntu:latest -# Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes) RUN apt update && apt install -y RUN apt-get install -y python3 RUN apt-get install -y unzip @@ -10,23 +8,15 @@ RUN apt-get install -y python3-pip RUN python3 -m pip install kaggle RUN python3 -m pip install pandas -RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle +# RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle -# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane) WORKDIR /app -# Skopiujmy nasz skrypt do katalogu /app w kontenerze +COPY ./house-price-dataset.zip ./ COPY ./startscript1.sh ./ COPY ./src/task1python.py ./src/task1python.py COPY ./src/pythonTest.py ./src/pythonTest.py - RUN chmod +x ./startscript1.sh -RUN ./startscript1.sh - -RUN chmod a+x ./src/task1python.py -RUN chmod a+x ./src/pythonTest.py - -# Domyślne polecenie, które zostanie uruchomione w kontenerze po jego starcie -# RUN chmod u+x ./startscript1.sh -# RUN chmod u+x ./src/task1python.py \ No newline at end of file +RUN chmod +x ./src/task1python.py +RUN chmod +x ./src/pythonTest.py \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index d28248b..ef8692b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,8 +25,8 @@ pipeline { } stage("Shell Scripts") { steps { - sh "sudo usermod -aG docker jenkins" - sh "KAGGLE_USERNAME=${params.KAGGLE_USERNAME} KAGGLE_KEY=${params.KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh" + // sh "KAGGLE_USERNAME=${params.KAGGLE_USERNAME} KAGGLE_KEY=${params.KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh" + sh './startscript1.sh' sh 'python3 ./src/task1python.py' archiveArtifacts 'data.txt' } diff --git a/startscript1.sh b/startscript1.sh index 927f91a..9fb2cd9 100644 --- a/startscript1.sh +++ b/startscript1.sh @@ -1,5 +1,5 @@ #!/bin/sh -kaggle datasets download -d akash14/house-price-dataset +# kaggle datasets download -d akash14/house-price-dataset unzip -o house-price-dataset.zip echo $CUTOFF