files and dirs cleanup

This commit is contained in:
Szymon Parafiński 2022-03-31 21:28:00 +02:00
parent 3c5e0d3a92
commit 0d8e21ea55
11 changed files with 59 additions and 80 deletions

21
Docker/Jenkinsfile vendored
View File

@ -1,21 +0,0 @@
pipeline {
agent any
stages {
stage ("run agent") {
steps {
sh 'cd ./Docker
ls -la'
sh 'docker build -f ./Docker/Dockerfile -t ium_docker .'
}
}
stage('Split set into dev/train/test') {
steps {
sh 'docker run -ti ium_docker python3 ./Docker/script.py'
}
}
}
}

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
mkdir ./.kaggle
cd .kaggle
touch kaggle.json
echo "{\"username\":\"szymonparafinski\",\"key\":\"a95757bcf7f0def396b5294d971bf6dd\"}" >> kaggle.json
mkdir dataset
cd dataset
kaggle datasets download -d harshitshankhdhar/imdb-dataset-of-top-1000-movies-and-tv-shows
unzip -o imdb-dataset-of-top-1000-movies-and-tv-shows.zip
$SHELL

View File

@ -1,7 +1,5 @@
# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest
FROM ubuntu:latest FROM ubuntu:latest
# Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes)
RUN apt-get update --fix-missing RUN apt-get update --fix-missing
RUN apt-get -y install python3-pip RUN apt-get -y install python3-pip
RUN apt-get -y install nano RUN apt-get -y install nano
@ -16,3 +14,4 @@ COPY ./download.sh ./
COPY ./imdb_top_1000.csv ./ COPY ./imdb_top_1000.csv ./
CMD python3 ./script.py CMD python3 ./script.py
CMD echo 'Exiting docker'

54
Jenkinsfile vendored
View File

@ -1,50 +1,12 @@
pipeline { pipeline {
agent any agent any
parameters {
string(
defaultValue: 'szymonparafinski',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: 'a95757bcf7f0def396b5294d971bf6dd',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: '500',
description: 'Cutoff lines',
name: 'CUTOFF'
)
}
environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY"
CUTOFF="$params.CUTOFF"
}
stages { stages {
stage('Check out from version control'){
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444018', url: 'https://git.wmi.amu.edu.pl/s444018/ium_444018.git']]])
}
}
stage('Script'){ stage ("Build Docker image") {
steps { steps {
script { sh 'docker build -f ./Docker/Dockerfile -t ium_docker .'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", }
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { }
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' }
sh 'kaggle datasets list' }
}
}
sh 'echo Downloading dataset'
sh 'chmod +x download.sh'
sh './download.sh'
archiveArtifacts artifacts: 'imdb_top_1000_dev.csv, imdb_top_1000_test.csv, imdb_top_1000_train.csv', followSymlinks: false
}
}
}
}

50
lab3/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,50 @@
pipeline {
agent any
parameters {
string(
defaultValue: 'szymonparafinski',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: 'a95757bcf7f0def396b5294d971bf6dd',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: '500',
description: 'Cutoff lines',
name: 'CUTOFF'
)
}
environment {
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
KAGGLE_KEY="$params.KAGGLE_KEY"
CUTOFF="$params.CUTOFF"
}
stages {
stage('Check out from version control'){
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444018', url: 'https://git.wmi.amu.edu.pl/s444018/ium_444018.git']]])
}
}
stage('Script'){
steps {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
sh 'echo Downloading dataset'
sh 'chmod +x download.sh'
sh './download.sh'
archiveArtifacts artifacts: 'imdb_top_1000_dev.csv, imdb_top_1000_test.csv, imdb_top_1000_train.csv', followSymlinks: false
}
}
}
}