diff --git a/README.md b/README.md index dac469c..6653841 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,31 @@ For a more detailed account of each column in the dataset see the data dictionar ## Running the Application (Windows) -### Docker Image +### Anaconda -The latest version of the Random Telecom Payments app can be found as a docker image on dockerhub here: +Create a local conda environment for the Random Telecom Payments app using [anaconda](https://www.anaconda.com/): + +``` +conda create --name RandomTelecomPayments python=3.12 --yes +conda activate RandomTelecomPayments +pip install -r requirements.txt +``` + +Execute the Random Telecom Payments app to generate data for 2000 users using the following command and the local conda environment: + +``` +python generator\\main.py --n_users 1000 --use_random_seed 1 --n_itr 2 +``` + +View the generated Random Telecom Payments data using the following command: + +``` +type data\\RandomTelecomPayments.csv | more +``` + +### Docker + +The latest version of the Random Telecom Payments app can be found as a [docker](https://www.docker.com/) image on dockerhub here: * https://hub.docker.com/repository/docker/oislen/randomtelecompayments/general diff --git a/conda/RandomTelecomPayments.cmd b/conda/RandomTelecomPayments.cmd index d268d12..57a95eb 100644 --- a/conda/RandomTelecomPayments.cmd +++ b/conda/RandomTelecomPayments.cmd @@ -5,7 +5,7 @@ call conda env list call conda deactivate call conda env remove --name RandomTelecomPayments --yes call conda env list -call conda create --name RandomTelecomPayments python=3 --yes +call conda create --name RandomTelecomPayments python=3.12 --yes call conda activate RandomTelecomPayments call conda list diff --git a/exeDocker.cmd b/exeDocker.cmd index 0ac8e11..0452ab6 100644 --- a/exeDocker.cmd +++ b/exeDocker.cmd @@ -15,7 +15,7 @@ call docker build --no-cache -t %DOCKER_IMAGE% . SET UBUNTU_DIR=/home/ubuntu call docker run --name %DOCKER_CONTAINER_NAME% --memory 7GB --volume E:\GitHub\RandomTelecomPayments\data:/home/ubuntu/RandomTelecomPayments/data --rm %DOCKER_IMAGE% --n_users 100 --use_random_seed 1 --n_itr 1 :: call docker run --name %DOCKER_CONTAINER_NAME%w --memory 7GB --volume E:\GitHub\RandomTelecomPayments\data:/home/ubuntu/RandomTelecomPayments/data --rm %DOCKER_IMAGE% --n_users 13000 --use_random_seed 1 --n_itr 2 -:: call docker run -it --entrypoint sh --name %DOCKER_CONTAINER_NAME% --memory 7GB --volume E:\GitHub\RandomTelecomPayments\data:/home/ubuntu/RandomTelecomPayments/data --rm %DOCKER_IMAGE% +:: call docker run -it --entrypoint bash --name %DOCKER_CONTAINER_NAME% --memory 7GB --volume E:\GitHub\RandomTelecomPayments\data:/home/ubuntu/RandomTelecomPayments/data --rm %DOCKER_IMAGE% :: useful docker commands :: docker images diff --git a/generator/cons.py b/generator/cons.py index c7cebf4..783ac56 100644 --- a/generator/cons.py +++ b/generator/cons.py @@ -1,9 +1,10 @@ import os -import platform +import re import sys import datetime -fpath_repo_dir = 'E:\\GitHub\\RandomTelecomPayments' if platform.system() == 'Windows' else "/home/runner/work/RandomTelecomPayments/RandomTelecomPayments" if "GITHUB_ACTIONS_UNITTEST_FLAG" in os.environ else '/home/ubuntu/RandomTelecomPayments' +root_dir_re_match = re.findall(string=os.getcwd(), pattern="^.+RandomTelecomPayments") +fpath_repo_dir = root_dir_re_match[0] if len(root_dir_re_match) > 0 else os.path.join(".", "RandomTelecomPayments") sys.path.append(fpath_repo_dir) # set sub directories subdir_data = os.path.join(fpath_repo_dir, 'data') diff --git a/requirements.txt b/requirements.txt index ee7fcff..213f85d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,5 @@ scikit-learn==1.6.1 pyarrow==18.1.0 fastparquet==2024.11.0 beartype==0.19.0 -unidecode==1.3.8 \ No newline at end of file +unidecode==1.3.8 +boto3==1.36.12 \ No newline at end of file