MountaintopLotus / braintrust

A Dockerized platform for running Stable Diffusion, on AWS (for now)
Apache License 2.0
1 stars 2 forks source link

Copilot and ECS #68

Open JohnTigue opened 1 year ago

JohnTigue commented 1 year ago

Sounds like copilot is the bee's knees for deploying on ECS. Let's give it a spin.

JohnTigue commented 1 year ago

Efe, a coder on copilot, is the most knowledgeable speaker on the topic of copilot:

JohnTigue commented 1 year ago

Seems copilot does NOT come preinstalled in the Amazon Linux distros. Installing copilot is though a one liner:

curl -Lo copilot https://github.com/aws/copilot-cli/releases/latest/download/copilot-linux && chmod +x copilot && sudo mv copilot /usr/local/bin/copilot && copilot --help
JohnTigue commented 1 year ago

Copilot just takes care of SO MUCH rigmarole. It's worth the adoption cost.

JohnTigue commented 1 year ago

Key Skills Python DevOps Projects with Copilot 3 hours of best practicing with copilot. He's good.

JohnTigue commented 1 year ago

Basically following these instructions from AWS: Deploy a clustered application to Amazon ECS by using AWS Copilot.

JohnTigue commented 1 year ago

A different, non-copolit method, but same result: Docker Compose: From Local to Amazon ECS. Compared to copilot, that is less AWS dependent but that's not a goal here.

JohnTigue commented 1 year ago

How do I allow Amazon ECS tasks to pull images from an Amazon ECR image repository?

JohnTigue commented 1 year ago

This means copilot enables hybrid serverless and cluster services. Outstanding:

Package addon CloudFormation templates before deployments: Copilot will now package addon templates on copilot svc deploy. This means Copilot can now deploy AWS Lambda functions alongside your containerized services!

JohnTigue commented 1 year ago

Drat, going by Amazon ECS-optimized AMI it looks like I need to migrate from my current Ubuntu AMIs to Amazon Linux 2, because there are no Ubuntu AMIs on the list:

Amazon Linux 2 (GPU), Amazon ECS GPU-optimized AMI: Based on Amazon Linux 2, this AMI is recommended for use when launching your Amazon EC2 GPU-based instances for your Amazon ECS workloads. It comes pre-configured with NVIDIA kernel drivers and a Docker GPU runtime which makes running workloads that take advantage of GPUs on Amazon ECS. For more information, see Working with GPUs on Amazon ECS.