Dockerfile

This commit is contained in:
Mateusz 2024-04-01 15:50:56 +02:00
parent cb6d02ac48
commit c744e100a6
2 changed files with 3 additions and 2 deletions

3
Jenkinsfile vendored
View File

@ -24,6 +24,9 @@ pipeline {
stage('Run create-dataset script') { stage('Run create-dataset script') {
steps { steps {
withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'mkdir .kaggle'
sh 'echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > .kaggle/kaggle.json'
sh 'chmod 600 .kaggle/kaggle.json'
sh 'chmod +x create-dataset.py' sh 'chmod +x create-dataset.py'
sh 'python3 ./create-dataset.py' sh 'python3 ./create-dataset.py'
} }

View File

@ -9,9 +9,7 @@ from sklearn.model_selection import train_test_split
def download_kaggle_dataset(): def download_kaggle_dataset():
os.system("ls -al ~/.kaggle")
os.system("cat ~/.kaggle/kaggle.json") os.system("cat ~/.kaggle/kaggle.json")
os.system("ls /.kaggle")
kaggle = KaggleApi() kaggle = KaggleApi()
kaggle.authenticate() kaggle.authenticate()
kaggle.dataset_download_files("mlg-ulb/creditcardfraud", path="./", unzip=True) kaggle.dataset_download_files("mlg-ulb/creditcardfraud", path="./", unzip=True)