Skip to content

Commit

Permalink
remove image building
Browse files Browse the repository at this point in the history
  • Loading branch information
PGimenez committed Jul 11, 2023
1 parent 3801c64 commit 9bff12a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 66 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ on:

env:
AWS_REGION: us-east-1 # set this to your preferred AWS region, e.g. us-west-1
ECR_REPOSITORY: whisper # set this to your Amazon ECR repository name
ECS_SERVICE: whisper-service # set this to your Amazon ECS service name
# ECR_REPOSITORY: whisper # set this to your Amazon ECR repository name
# ECS_SERVICE: whisper-service # set this to your Amazon ECS service name
ECS_CLUSTER: genie # set this to your Amazon ECS cluster name
ECS_TASK_DEFINITION: awstask.json # set this to the path to your Amazon ECS task definition
# file, e.g. .aws/task-definition.json
Expand All @@ -64,23 +64,23 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
# - name: Build, tag, and push image to Amazon ECR
# id: build-image
# env:
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
# IMAGE_TAG: ${{ github.sha }}
# run: |
# # Build a docker container and
# # push it to ECR so that it can
# # be deployed to ECS.
# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
Expand Down
71 changes: 23 additions & 48 deletions awstask.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,45 @@
{
"family": "genie-task",
"taskRoleArn": "ecsTaskExecutionRole",
"networkMode": "bridge",
"family": "genie",
"containerDefinitions": [
{
"name": "whisper",
"image": "whisper",
"cpu": 1024,
"memory": 2048,
"image": "pjgim/whisper",
"cpu": 0,
"portMappings": [
{
"name": "whisper-8000-tcp",
"containerPort": 8000,
"hostPort": 8000,
"protocol": "tcp"
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [
{
"name": "JULIA_DEPOT_PATH",
"value": "/home/genie/.julia"
},
{
"name": "JULIA_REVISE",
"value": "off"
},
{
"name": "GENIE_ENV",
"value": "prod"
},
{
"name": "GENIE_HOST",
"value": "0.0.0.0"
},
{
"name": "PORT",
"value": "8000"
},
{
"name": "WSPORT",
"value": "8000"
}
],
"environment": [],
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "genie-logs",
"awslogs-create-group": "true",
"awslogs-group": "/ecs/genie",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "genie"
"awslogs-stream-prefix": "ecs"
}
},
"healthCheck": {
"command": [
"CMD-SHELL",
"curl -f http://localhost:8000 || exit 1"
],
"interval": 30,
"timeout": 5,
"retries": 3,
"startPeriod": 0
}
}
],
"executionRoleArn": "arn:aws:iam::423888958564:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"requiresCompatibilities": [
"EC2"
"FARGATE"
],
"cpu": "1024",
"memory": "2048"
"cpu": "512",
"memory": "1024",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
}
}

0 comments on commit 9bff12a

Please sign in to comment.