Dodano do dockerfile i jenkinsa obsluge skryptu z pytorchem.
All checks were successful
s426206-training/pipeline/head This commit looks good

This commit is contained in:
Jan Nowak 2021-04-24 20:24:02 +02:00
parent 39bbbfcca7
commit 6f485d6db1
4 changed files with 13 additions and 10 deletions

View File

@ -8,12 +8,18 @@ RUN pip3 install kaggle
RUN apt install -y unzip
RUN mkdir /.kaggle
RUN chmod -R 777 /.kaggle
#RUN export KAGGLE_CONFIG_DIR=~/.kaggle
COPY ./requirments.txt ./
RUN pip3 install -r requirments.txt
RUN pip3 install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane)
WORKDIR /app
# Skopiujmy nasz skrypt do katalogu /app w kontenerze
COPY ./skrypt.sh ./
RUN chmod +x skrypt.sh
RUN dos2unix skrypt.sh
# COPY ./skrypt.sh ./
# RUN chmod +x skrypt.sh
# RUN dos2unix skrypt.sh
COPY ./dlgssdpytorch.py ./
RUN chmod +x dlgssdpytorch.py

6
Jenkinsfile vendored
View File

@ -33,8 +33,8 @@ pipeline {
script {
def img = docker.build('rokoch/ium:01')
img.inside {
sh 'chmod +x skrypt.sh'
sh './skrypt.sh $CUTOFF'
sh 'chmod +x dlgssdpytorch.py'
sh 'python3 ./dlgssdpytorch.py | tee output.txt'
}
}
}
@ -44,7 +44,7 @@ pipeline {
stage('end') {
steps {
//Zarchiwizuj wynik
archiveArtifacts 'output.txt,Global_Superstore22.csv,Global_Superstore2.csv.dev,Global_Superstore2.csv.test,Global_Superstore2.csv.train'
archiveArtifacts 'output.txt'
}
}
}

View File

@ -149,4 +149,4 @@ for epoch in range(n_epochs):
# Checks model's parameters
print(model.state_dict())
print("Mean squared error for training: ", np.mean(losses))
print("Mean squared error for valid: ", np.mean(val_losses))
print("Mean squared error for validating: ", np.mean(val_losses))

View File

@ -21,9 +21,6 @@ six==1.15.0
sklearn==0.0
text-unidecode==1.3
threadpoolctl==2.1.0
torch==1.8.1+cpu
torchaudio==0.8.1
torchvision==0.9.1+cpu
torchviz==0.0.2
tqdm==4.60.0
typing-extensions==3.7.4.3