diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1dce7b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.11 + +RUN apt-get update && apt-get -y upgrade +RUN apt-get install -y build-essential + +RUN python -m pip install --upgrade pip +COPY requirements.txt /tmp +RUN python -m pip install -r /tmp/requirements.txt + +WORKDIR /app + +COPY ./download.sh ./ +COPY ./calculate.sh ./ + +CMD bash \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index a4b7609..f55eb25 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,13 @@ pipeline { stages { stage('Download Dataset') { + agent { + dockerfile { + filename 'Dockerfile' + reuseNode true + } + } + steps { script { withEnv(["CUTOFF=${params.CUTOFF}"]) { diff --git a/JenkinsfileStats b/JenkinsfileStats index dae8dbe..00f5676 100644 --- a/JenkinsfileStats +++ b/JenkinsfileStats @@ -24,13 +24,15 @@ pipeline { } stage('Execute Script') { + agent { + dockerfile { + filename 'Dockerfile' + reuseNode true + } + } + steps { sh 'bash ./calculate.sh' - } - } - - stage('Archive Results') { - steps { archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true } } diff --git a/requirements.txt b/requirements.txt index 16dc232..3ea24b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ matplotlib==3.8.3 numpy==1.26.4 -torch==2.2.1 -torchvision==0.17.1 +