Dockerfile

This commit is contained in:
Mateusz 2024-04-01 16:20:48 +02:00
parent 360227c18c
commit ab20b9c0de
2 changed files with 12 additions and 12 deletions

2
Jenkinsfile vendored
View File

@ -2,7 +2,7 @@ pipeline {
agent { agent {
dockerfile { dockerfile {
filename 'Dockerfile' filename 'Dockerfile'
args '-u root -v $HOME:/app' args '-u root'
} }
} }

View File

@ -69,11 +69,11 @@ def save_undersample_data(
y_train_undersample, y_train_undersample,
y_test_undersample, y_test_undersample,
): ):
undersample_data.to_csv("/data/undersample_data.csv", index=False) undersample_data.to_csv("data/undersample_data.csv", index=False)
X_train_undersample.to_csv("/data/X_train_undersample.csv", index=False) X_train_undersample.to_csv("data/X_train_undersample.csv", index=False)
X_test_undersample.to_csv("/data/X_test_undersample.csv", index=False) X_test_undersample.to_csv("data/X_test_undersample.csv", index=False)
y_train_undersample.to_csv("/data/y_train_undersample.csv", index=False) y_train_undersample.to_csv("data/y_train_undersample.csv", index=False)
y_test_undersample.to_csv("/data/y_test_undersample.csv", index=False) y_test_undersample.to_csv("data/y_test_undersample.csv", index=False)
def split_whole_data(df): def split_whole_data(df):
@ -87,16 +87,16 @@ def split_whole_data(df):
def save_whole_data(df, X_train, X_test, y_train, y_test): def save_whole_data(df, X_train, X_test, y_train, y_test):
df.to_csv("/data/creditcard.csv", index=False) df.to_csv("data/creditcard.csv", index=False)
X_train.to_csv("/data/X_train.csv", index=False) X_train.to_csv("data/X_train.csv", index=False)
X_test.to_csv("/data/X_test.csv", index=False) X_test.to_csv("data/X_test.csv", index=False)
y_train.to_csv("/data/y_train.csv", index=False) y_train.to_csv("data/y_train.csv", index=False)
y_test.to_csv("/data/y_test.csv", index=False) y_test.to_csv("data/y_test.csv", index=False)
def main(): def main():
download_kaggle_dataset() download_kaggle_dataset()
os.makedirs("/data", exist_ok=True) os.makedirs("data", exist_ok=True)
df = load_data("creditcard.csv") df = load_data("creditcard.csv")
df = normalize_data(df) df = normalize_data(df)