Giter VIP home page Giter VIP logo

local-run's Introduction

Bedrock-Streamlit-Redis-Application

Streamlit Application for AWS Bedrock LLM with Redis

Prerequisites

  • AWS CLI installed and configured
  • Docker and Docker Compose installed
  • Access to AWS account and AWS Elastic Container Registry (ECR)

1. Starting an EC2 Instance

Before proceeding, ensure that your AWS CLI is configured. You can set it up by running:

aws configure

Enter your AWS Access Key, Secret Key, default region, and output format when prompted.

2. Connecting to Docker via AWS ECR

Authenticate Docker to your AWS Elastic Container Registry using the following command:

aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com

Replace <region> with your AWS region (e.g., us-west-2) and <aws_account_id> with your actual AWS account ID.

3. SSH Configuration for Easy Access

To simplify the SSH process into your EC2 instance, configure your SSH as follows:

Host streamlit-app
    HostName <EC2_Instance_IP>
    User ec2-user
    IdentityFile '<path_to_your_pem_file>'

Replace <EC2_Instance_IP> with your instance's IP address and <path_to_your_pem_file> with the path to your .pem file.

Host streamlit-app
    HostName 54.242.41.58
    User ec2-user
    IdentityFile '/Users/jyeo_/.ssh/jon-mbp.pem'

4. Installing and Configuring Docker

Gain root access and install Docker:

sudo -i
yum install docker

Install Docker Compose:

curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

5. Running Docker Containers

Navigate to your project directory where your docker-compose.yml is located and run:

docker-compose pull
docker-compose up -d

6. Managing Docker Containers

To stop your Docker containers:

docker-compose stop

To remove your Docker containers completely:

docker-compose down

Accessing Your Application

Visit your application via:

https://jyeo.capeguy.net/

End of documentation.

local-run's People

Contributors

capeguy avatar jyeomj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.