diff --git a/Dockerfile b/Dockerfile index 7e3b014..262dfa0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,19 @@ RUN python3 -m pip install numpy RUN python3 -m pip install torch RUN python3 -m pip install torchvision -COPY ./zadanie1.py ./ +#COPY ./zadanie1.py ./ COPY ./Customers.csv ./ COPY ./train.py ./ -COPY ./test.py ./ -COPY ./cifar_net.pth ./ +#COPY ./test.py ./ +#COPY ./cifar_net.pth ./ RUN chmod +r ./Customers.csv -RUN chmod +x ./zadanie1.py +#RUN chmod +x ./zadanie1.py RUN chmod +x ./train.py -RUN chmod +x ./test.py +#RUN chmod +x ./test.py + +ARG epochs = 5 +RUN echo $epochs CMD python3 ./train.py -CMD python3 ./test.py \ No newline at end of file +#CMD python3 ./test.py \ No newline at end of file diff --git a/Jenkinsfile_3 b/Jenkinsfile_3 new file mode 100644 index 0000000..da40d20 --- /dev/null +++ b/Jenkinsfile_3 @@ -0,0 +1,28 @@ +pipeline { + agent any + //Definijuemy parametry, ktore bedzie mozna podac podczas wywolywania zadania + parameters { + string ( + name: 'epochs_count', + defaultValue: '10', + description: 'How many epochs do you want to train?', + ) + } + stages { + } + stage('Run Script') { + steps { + script { + sh 'docker build . -t jhenyk/ium:latest --build-arg epochs=epochs_count' + sh 'docker run jhenyk/ium:latest' + } + } + + } + stage('Archive Output') { + steps { + archiveArtifacts 'cifar_net.pth' + } + } + } +} \ No newline at end of file