From 76714a0f2d196f64b1c7ff4308850c2a2b86df74 Mon Sep 17 00:00:00 2001 From: wikbom Date: Wed, 10 May 2023 17:15:49 +0200 Subject: [PATCH] dockerfile context change in directories --- Jenkinsfile | 2 +- JenkinsfileTrain | 2 +- dockerfile | 23 +++++++++++++++++++++++ train/dockerfile | 19 +++++++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 dockerfile create mode 100644 train/dockerfile diff --git a/Jenkinsfile b/Jenkinsfile index 4e78bf7..706df08 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ node { checkout scm - def dockerimage = docker.build("titanic-image", "./dockerfiles/docker-titanic") + def dockerimage = docker.build("titanic-image") dockerimage.inside { stage('Preparation') { properties([ diff --git a/JenkinsfileTrain b/JenkinsfileTrain index 7b52770..ac16987 100644 --- a/JenkinsfileTrain +++ b/JenkinsfileTrain @@ -1,6 +1,6 @@ node { checkout scm - def dockerimage = docker.build("titanic-image", "./dockerfiles/docker-train") + def dockerimage = docker.build("train-image", "./train") dockerimage.inside { stage('Preparation') { properties([ diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..4e565dd --- /dev/null +++ b/dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:latest + +RUN apt-get update --fix-missing +RUN apt install python3-pip -y +RUN apt install unzip -y +RUN apt install git -y + +RUN pip install --user kaggle +RUN pip install --user pandas + + +RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle +ENV PATH="$PATH:~/.local/bin/kaggle" +ENV KAGGLE_USERNAME="wiktorbombola" +ENV KAGGLE_KEY="" + +# RUN echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc + +COPY ./script.sh ./ +COPY ./learning.py ./ + +# CMD ./script.sh 300 +# CMD ./learning.py \ No newline at end of file diff --git a/train/dockerfile b/train/dockerfile new file mode 100644 index 0000000..e860450 --- /dev/null +++ b/train/dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:latest + +RUN apt-get update --fix-missing +RUN apt install python3-pip -y +RUN apt install unzip -y +RUN apt install git -y + +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 echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc + +COPY ./learning.py ./ + +# CMD ./script.sh 300 +# CMD ./learning.pyRUN pip install --user numpy