https://github.com/sechi42/github-actions
Este proyecto automatiza el despliegue de un modelo de machine learning utilizando GitHub Actions. El pipeline CI/CD construye, prueba y despliega una imagen Docker en Amazon ECR, luego se implementa en una instancia EC2 para predecir la tasa de cancelación de clientes de la empresa Interconnect.
https://github.com/sechi42/github-actions
aws-ec2 aws-ecr fastapi python tensorflow
Last synced: 5 months ago
JSON representation
Este proyecto automatiza el despliegue de un modelo de machine learning utilizando GitHub Actions. El pipeline CI/CD construye, prueba y despliega una imagen Docker en Amazon ECR, luego se implementa en una instancia EC2 para predecir la tasa de cancelación de clientes de la empresa Interconnect.
- Host: GitHub
- URL: https://github.com/sechi42/github-actions
- Owner: Sechi42
- Created: 2024-09-03T15:00:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-07T17:08:58.000Z (almost 2 years ago)
- Last Synced: 2025-07-12T12:44:27.878Z (12 months ago)
- Topics: aws-ec2, aws-ecr, fastapi, python, tensorflow
- Language: Python
- Homepage:
- Size: 4.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# Setup Virtual Environment
```python
conda create -n fastapi-env python=3.12.4
conda activate fastapi-env
pip install -r requirements.txt
```
# Running the server
`uvicorn main:app --reload`
# `uvicorn main:my_first_api --reload`
The command `uvicorn main:app` refers to:
- main: the file main.py (the Python "module").
- app: the object created inside of main.py with the line app = FastAPI().
- --reload: make the server restart after code changes. Only use for development.
```
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo systemctl start docker
sudo service docker status
sudo groupadd docker
sudo usermod -a -G docker ec2-user
newgrp docker
docker —-version
# create ECR with name: my-flask-app
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 866824485776.dkr.ecr.us-east-1.amazonaws.com