diff --git a/Jenkinsfile b/Jenkinsfile index 706df08..4e78bf7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ node { checkout scm - def dockerimage = docker.build("titanic-image") + def dockerimage = docker.build("titanic-image", "./dockerfiles/docker-titanic") dockerimage.inside { stage('Preparation') { properties([ diff --git a/JenkinsfileTrain b/JenkinsfileTrain index 81ea3bc..7b52770 100644 --- a/JenkinsfileTrain +++ b/JenkinsfileTrain @@ -1,6 +1,6 @@ node { checkout scm - def dockerimage = docker.build("titanic-image") + def dockerimage = docker.build("titanic-image", "./dockerfiles/docker-train") dockerimage.inside { stage('Preparation') { properties([ diff --git a/dockerfile b/dockerfiles/docker-titanic similarity index 72% rename from dockerfile rename to dockerfiles/docker-titanic index 6ab1a80..4e565dd 100644 --- a/dockerfile +++ b/dockerfiles/docker-titanic @@ -7,11 +7,7 @@ RUN apt install git -y RUN pip install --user kaggle RUN pip install --user pandas -RUN pip install --user numpy -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" diff --git a/dockerfiles/docker-train b/dockerfiles/docker-train new file mode 100644 index 0000000..e860450 --- /dev/null +++ b/dockerfiles/docker-train @@ -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