Navigate to optiver_app directory
cd optiver_app/
-
To Create DB Schema
python src/schema.py --create-schema
-
To Run initial Data Ingestion
- nohup python app/ingest_data.py \ --data-path data/optiver_train.csv \ --batch-size 5000 \ --commit > logs/ingestion_logs.log 2>&1 &
-
Create .env file and fill the necessary credentials
touch .env copy env_copy .env
-
To Build Optiver DB APP
docker build -f dockerfiles/Dockerfile.app -t optiver-db-app .
-
To run the Optiver DB APP
docker run -d --env-file $(pwd)/.env -p 80:80 optiver-db-app
-
Create a ECR Repository using AWS console
-
Change "AWS_ECR_REPO_URI" and "ECR_REPO_NAME" variables in ecr_push.sh according to your configuration
-
Push the image to ECR
sh ecr_push.sh <local_image_name> <ecr_version>
-
Example
sh ecr_push.sh optiver-db-app v1
- Create or chose an existing cluster
- Create a ECS Fargate Tasks with the container image and environment variables
- Deploy the task as ECS Service
- Configure Security Groups and Load Balancer to route traffic