claude is working on AWS now.
modified: install-ubuntu.sh modified: template.yaml
This commit is contained in:
parent
c074dad677
commit
f3ab7e7a4b
2 changed files with 8 additions and 6 deletions
|
|
@ -12,6 +12,7 @@ sudo apt install -y git python3-pip python3.10-venv
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
if [ ! -d "/opt/flask-socketio-llm-completions" ]; then
|
if [ ! -d "/opt/flask-socketio-llm-completions" ]; then
|
||||||
sudo git clone https://github.com/russellballestrini/flask-socketio-llm-completions.git /opt/flask-socketio-llm-completions
|
sudo git clone https://github.com/russellballestrini/flask-socketio-llm-completions.git /opt/flask-socketio-llm-completions
|
||||||
|
touch /opt/flask-socketio-llm-completions/.flaskenv
|
||||||
else
|
else
|
||||||
echo "The directory /opt/flask-socketio-llm-completions already exists."
|
echo "The directory /opt/flask-socketio-llm-completions already exists."
|
||||||
fi
|
fi
|
||||||
|
|
@ -52,6 +53,7 @@ Group=$(whoami)
|
||||||
WorkingDirectory=/opt/flask-socketio-llm-completions
|
WorkingDirectory=/opt/flask-socketio-llm-completions
|
||||||
Environment="PATH=/opt/flask-socketio-llm-completions/env/bin"
|
Environment="PATH=/opt/flask-socketio-llm-completions/env/bin"
|
||||||
ExecStart=/opt/flask-socketio-llm-completions/env/bin/python app.py
|
ExecStart=/opt/flask-socketio-llm-completions/env/bin/python app.py
|
||||||
|
EnvironmentFile=/opt/flask-socketio-llm-completions/.flaskenv
|
||||||
|
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
|
@ -83,4 +85,3 @@ FLASK_APP=app.py flask db stamp head
|
||||||
deactivate
|
deactivate
|
||||||
|
|
||||||
echo "Setup and service configuration completed successfully."
|
echo "Setup and service configuration completed successfully."
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,16 @@ Resources:
|
||||||
PolicyDocument:
|
PolicyDocument:
|
||||||
Version: '2012-10-17'
|
Version: '2012-10-17'
|
||||||
Statement:
|
Statement:
|
||||||
- Sid: "Statement1"
|
- Sid: "InvokeModel"
|
||||||
Effect: "Allow"
|
Effect: "Allow"
|
||||||
Action:
|
Action:
|
||||||
- "bedrock:InvokeModel"
|
- "bedrock:InvokeModel"
|
||||||
Resource: "*"
|
Resource: "*"
|
||||||
|
- Sid: "InvokeModelWithResponseStream"
|
||||||
|
Effect: "Allow"
|
||||||
|
Action:
|
||||||
|
- "bedrock:InvokeModelWithResponseStream"
|
||||||
|
Resource: "*"
|
||||||
|
|
||||||
InstanceProfile:
|
InstanceProfile:
|
||||||
Type: AWS::IAM::InstanceProfile
|
Type: AWS::IAM::InstanceProfile
|
||||||
|
|
@ -122,10 +127,6 @@ Outputs:
|
||||||
Description: The Instance ID of the EC2 instance
|
Description: The Instance ID of the EC2 instance
|
||||||
Value: !Ref EC2Instance
|
Value: !Ref EC2Instance
|
||||||
|
|
||||||
EC2PrivateIpAddress:
|
|
||||||
Description: "Private IP address of the EC2 instance"
|
|
||||||
Value: !GetAtt EC2Instance.PrivateIpAddress
|
|
||||||
|
|
||||||
LoadBalancerDNSName:
|
LoadBalancerDNSName:
|
||||||
Description: The DNS name of the ALB
|
Description: The DNS name of the ALB
|
||||||
Value: !GetAtt LoadBalancer.DNSName
|
Value: !GetAtt LoadBalancer.DNSName
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue