This project is an end-to-end text summarization solution, designed to condense lengthy texts while retaining the essential information. It involves various components and requires a series of updates to configuration files and source code to ensure seamless operation.
- Conda (Miniconda or Anaconda)
- Python 3.8
-
Clone the Repository:
git clone https://github.com/omid-sar/End_to_End_Text_Summarizer_AWS cd End_to_End_Text_Summarizer_AWS
-
Create and Activate a Conda Environment:
conda create -n summary python=3.8 -y conda activate summary
-
Install the Requirements:
pip install -r requirements.txt
-
Run the Application:
python app.py
After running, access the application via your local host and specified port.
Ensure to sequentially update the following components for optimal performance:
config.yaml
params.yaml
- Entity configurations
- Configuration manager in
src/config
- Components
- Pipeline
main.py
app.py
- Author: Omid Sar
- Email: mr.omid.sardari@gmail.com
This guide provides a comprehensive walkthrough for deploying a Dockerized application on AWS EC2 using Github Actions for continuous integration and continuous deployment (CI/CD).
- AWS Account
- Github Account
- Login: Ensure you are logged into your AWS console.
- Create IAM User: Ensure the user has the following policies:
AmazonEC2ContainerRegistryFullAccess
AmazonEC2FullAccess
- Create ECR Repository: Note down the URI.
- Create an EC2 Instance: Preferably Ubuntu.
- Install Docker on EC2:
- Optional: Update and upgrade the system.
sudo apt-get update -y sudo apt-get upgrade
- Required: Install Docker.
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker ubuntu newgrp docker
- Optional: Update and upgrade the system.
- Navigate to your repository's settings.
- Go to Actions > Runners.
- Click "New self-hosted runner" and follow the instructions.
- Navigate to your repository's settings.
- Go to Secrets and add the following:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
AWS_ECR_LOGIN_URI
ECR_REPOSITORY_NAME
- Build Docker Image: Locally or in CI/CD pipeline.
- Push Docker Image to ECR: Use AWS CLI or Github Actions.
- Launch EC2 Instance: Ensure it has Docker installed.
- Pull Docker Image on EC2: Use AWS CLI.
- Run Docker Container on EC2: Start your application.