Dockerfile

This commit is contained in:
Mateusz 2024-04-01 16:48:55 +02:00
parent 6e8d683268
commit 5269c03239
2 changed files with 1 additions and 4 deletions

4
Jenkinsfile vendored
View File

@ -24,9 +24,7 @@ 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 /root/.kaggle' sh 'echo $KAGGLE_USERNAME'
sh 'echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > /root/.kaggle/kaggle.json'
sh 'chmod 600 /root/.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,7 +9,6 @@ from sklearn.model_selection import train_test_split
def download_kaggle_dataset(): def download_kaggle_dataset():
os.system("/root/.kaggle/kaggle.json")
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)