Skip to content

Commit

Permalink
Add finch support (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
bedanley authored Nov 6, 2024
1 parent 74c85c2 commit 26902b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
HEADLESS = false

DOCKER_CMD := $(CDK_DOCKER)
DOCKER_CMD ?= docker
# Arguments defined through command line or config.yaml

# PROFILE (optional argument)
Expand Down Expand Up @@ -150,13 +151,11 @@ installTypeScriptRequirements:

## Make sure Docker is running
dockerCheck:
@cmd_output=$$(docker ps); \
if \
[ $$? != 0 ]; \
then \
echo $$cmd_output; \
exit 1; \
fi; \
@cmd_output=$$(pgrep -f "${DOCKER_CMD}"); \
if [ $$? != 0 ]; then \
echo "Process $(DOCKER_CMD) is not running. Exiting..."; \
exit 1; \
fi \

## Check if models are uploaded
modelCheck:
Expand Down Expand Up @@ -229,11 +228,11 @@ cleanMisc:
dockerLogin: dockerCheck
ifdef PROFILE
@$(foreach ACCOUNT,$(ACCOUNT_NUMBERS_ECR), \
aws ecr get-login-password --region ${REGION} --profile ${PROFILE} | docker login --username AWS --password-stdin $(ACCOUNT).dkr.ecr.${REGION}.${URL_SUFFIX} >/dev/null 2>&1; \
aws ecr get-login-password --region ${REGION} --profile ${PROFILE} | ${DOCKER_CMD} login --username AWS --password-stdin ${ACCOUNT}.dkr.ecr.${REGION}.${URL_SUFFIX} >/dev/null 2>&1; \
)
else
@$(foreach ACCOUNT,$(ACCOUNT_NUMBERS_ECR), \
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin $(ACCOUNT).dkr.ecr.${REGION}.${URL_SUFFIX} >/dev/null 2>&1; \
aws ecr get-login-password --region ${REGION} | ${DOCKER_CMD} login --username AWS --password-stdin ${ACCOUNT}.dkr.ecr.${REGION}.${URL_SUFFIX} >/dev/null 2>&1; \
)
endif

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Before beginning, ensure you have:
3. Familiarity with AWS Cloud Development Kit (CDK) and infrastructure-as-code principles
4. Python 3.9 or later
5. Node.js 14 or later
6. Docker installed and running
6. Docker/Finch installed and running
7. Sufficient disk space for model downloads and conversions

If you're new to CDK, review the [AWS CDK Documentation](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) and consult with your AWS support team.
Expand Down Expand Up @@ -235,6 +235,7 @@ Set the following environment variables:
export PROFILE=my-aws-profile # Optional, can be left blank
export DEPLOYMENT_NAME=my-deployment
export ENV=dev # Options: dev, test, or prod
export CDK_DOCKER=finch # Optional, only required if not using docker as container engine
```

---
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"migrate-properties": "node ./scripts/migrate-properties.mjs",
"postinstall": "(cd lib/user-interface/react && npm install) && (cd lib/docs && npm install)",
"postbuild": "(cd lib/user-interface/react && npm build) && (cd lib/docs && npm build)"
},
},
"devDependencies": {
"@aws-cdk/aws-lambda-python-alpha": "2.125.0-alpha.0",
"@aws-sdk/client-iam": "^3.490.0",
Expand Down

0 comments on commit 26902b7

Please sign in to comment.