docker lab

This commit is contained in:
filnow 2024-04-02 23:00:30 +02:00
parent b5a93a49bb
commit 0f32cb6e77
4 changed files with 30 additions and 7 deletions

15
Dockerfile Normal file
View File

@ -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

7
Jenkinsfile vendored
View File

@ -23,6 +23,13 @@ pipeline {
stages { stages {
stage('Download Dataset') { stage('Download Dataset') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps { steps {
script { script {
withEnv(["CUTOFF=${params.CUTOFF}"]) { withEnv(["CUTOFF=${params.CUTOFF}"]) {

View File

@ -24,13 +24,15 @@ pipeline {
} }
stage('Execute Script') { stage('Execute Script') {
steps { agent {
sh 'bash ./calculate.sh' dockerfile {
filename 'Dockerfile'
reuseNode true
} }
} }
stage('Archive Results') {
steps { steps {
sh 'bash ./calculate.sh'
archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true archiveArtifacts artifacts: 'stats.txt', onlyIfSuccessful: true
} }
} }

View File

@ -1,4 +1,3 @@
matplotlib==3.8.3 matplotlib==3.8.3
numpy==1.26.4 numpy==1.26.4
torch==2.2.1
torchvision==0.17.1