Skip to content

Commit

Permalink
chore: fixing deployspec and manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
malachi-constant committed Feb 12, 2024
1 parent 1a705a5 commit f27bcdf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions manifests/sfn-example/aws-analysis-modules.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rip
path: git::https://github.com/awslabs/autonomous-driving-data-framework.git//modules/analysis/rosbag-image-pipeline/?ref=main
path: modules/analysis/rosbag-image-pipeline-sfn
parameters:
- name: vpc-id
valueFrom:
Expand Down Expand Up @@ -103,7 +103,7 @@ parameters:
valueFrom:
moduleMetadata:
group: optionals
name: dataxlake-buckets
name: datalake-buckets
key: FullAccessPolicyArn
- name: on-demand-job-queue-arn
valueFrom:
Expand Down
5 changes: 3 additions & 2 deletions modules/analysis/rosbag-image-pipeline-sfn/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

import os
import json

from aws_cdk import App, CfnOutput, Environment

Expand Down Expand Up @@ -40,8 +41,8 @@ def _param(name: str) -> str:
file_suffix = os.getenv(_param("FILE_SUFFIX"), ".bag")
desired_encoding = os.getenv(_param("DESIRED_ENCODING"), "bgr8")
yolo_model = os.getenv(_param("YOLO_MODEL"), "yolov5s")
image_topics = os.getenv(_param("IMAGE_TOPICS"))
sensor_topics = os.getenv(_param("SENSOR_TOPICS"))
image_topics = json.loads(os.getenv(_param("IMAGE_TOPICS")))
sensor_topics = json.loads(os.getenv(_param("SENSOR_TOPICS")))

emr_job_role = os.getenv(_param("EMR_JOB_EXEC_ROLE"))
emr_app_id = os.getenv(_param("EMR_APP_ID"))
Expand Down
4 changes: 2 additions & 2 deletions modules/analysis/rosbag-image-pipeline-sfn/deployspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deploy:
# Here we export some env vars
- export ADDF_MODULE_METADATA=$(python -c "import json; file=open('cdk-exports.json'); print(json.load(file)['addf-${ADDF_DEPLOYMENT_NAME}-${ADDF_MODULE_NAME}']['metadata'])") || true
- wget -O artifacts/spark-dynamodb_2.12-1.1.1.jar https://repo1.maven.org/maven2/com/audienceproject/spark-dynamodb_2.12/1.1.1/spark-dynamodb_2.12-1.1.1.jar
- aws s3 cp --recursive artifacts/ s3://$ADDF_PARAMETER_ARTIFACTS_BUCKET/artifacts/$ADDF_DEPLOYMENT_NAME/$ADDF_MODULE_NAME/
- aws s3 cp --recursive artifacts/ s3://$ADDF_PARAMETER_ARTIFACTS_BUCKET_NAME/artifacts/$ADDF_DEPLOYMENT_NAME/$ADDF_MODULE_NAME/
destroy:
phases:
install:
Expand All @@ -20,5 +20,5 @@ destroy:
build:
commands:
- cdk destroy --force --app "python app.py"
- aws s3 rm --recursive s3://$ADDF_PARAMETER_ARTIFACTS_BUCKET/artifacts/
- aws s3 rm --recursive s3://$ADDF_PARAMETER_ARTIFACTS_BUCKET_NAME/artifacts/

2 changes: 1 addition & 1 deletion modules/analysis/rosbag-image-pipeline-sfn/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
lane_detection_config: Dict[str, str],
emr_job_config: Dict[str, str],
stack_description: str,
image_topics: List[str],
image_topics: Any,
**kwargs: Any,
) -> None:
super().__init__(
Expand Down

0 comments on commit f27bcdf

Please sign in to comment.