diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cbf6d6c..965f517 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -74,6 +74,7 @@ jobs: with: persist-credentials: false fetch-depth: 0 + ref: further-fixes-for-release - name: Setup QEMU uses: docker/setup-qemu-action@v2 diff --git a/Dockerfile b/Dockerfile index ba24f44..e217d4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ RUN apt-get update && apt-get install -y \ gcc \ && rm -rf /var/lib/apt/lists/* -RUN pip install --no-cache-dir --upgrade \ - amazon-braket-pennylane-plugin==1.6.9 \ - boto3==1.20.48 \ - pennylane==0.24.0 \ +RUN pip install --no-cache-dir \ + boto3==1.28.5 \ + pennylane==0.31.1 \ + amazon-braket-pennylane-plugin==1.17.4 \ sagemaker-training RUN if [ -z "$PRE_RELEASE" ]; then \ diff --git a/covalent_braket_plugin/assets/infra/main.tf b/covalent_braket_plugin/assets/infra/main.tf index 650c461..adb81a8 100644 --- a/covalent_braket_plugin/assets/infra/main.tf +++ b/covalent_braket_plugin/assets/infra/main.tf @@ -27,7 +27,7 @@ resource "aws_s3_bucket" "braket_bucket" { } resource "aws_ecr_repository" "braket_ecr_repo" { - name = "${var.name}-base-executor-repo" + name = "amazon-braket-${var.name}-base-executor-repo" image_tag_mutability = "MUTABLE" force_delete = true @@ -41,7 +41,7 @@ resource "aws_ecr_repository" "braket_ecr_repo" { } resource "aws_iam_role" "braket_iam_role" { - name = "${var.name}-role" + name = "amazon-braket-${var.name}-role" assume_role_policy = jsonencode({ Version = "2012-10-17" Statement = [ diff --git a/covalent_braket_plugin/assets/infra/variables.tf b/covalent_braket_plugin/assets/infra/variables.tf index d837335..e054714 100644 --- a/covalent_braket_plugin/assets/infra/variables.tf +++ b/covalent_braket_plugin/assets/infra/variables.tf @@ -14,9 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Prefix this "name" with something unique for your deployment +# Prefix this "name" with something unique for your deployment. +# This is used in addition to the `amazon-braket` prefix to ensure uniqueness, for e.g. the full name will be `amazon-braket--bucket` for S3 bucket name. variable "name" { - default = "covalent-braket" + default = "sankalp-covalent" description = "Name to be used in the new provisioned resources" } diff --git a/covalent_braket_plugin/braket.py b/covalent_braket_plugin/braket.py index e94470f..f5f39f8 100644 --- a/covalent_braket_plugin/braket.py +++ b/covalent_braket_plugin/braket.py @@ -22,7 +22,7 @@ import tempfile from functools import partial from pathlib import Path -from typing import Any, Callable, Dict, List, Tuple +from typing import Any, Callable, Dict, List import boto3 import botocore @@ -30,13 +30,12 @@ from covalent._shared_files.config import get_config from covalent._shared_files.exceptions import TaskCancelledError from covalent._shared_files.logger import app_log -from covalent._workflow.transport import TransportableObject from covalent_aws_plugins import AWSExecutor _EXECUTOR_PLUGIN_DEFAULTS = { - "credentials": "", - "profile": "", - "region": "", + "credentials": "~/.aws/credentials", + "profile": "default", + "region": "us-east-1", "s3_bucket_name": os.environ.get("BRAKET_COVALENT_S3") or "amazon-braket-covalent-job-resources", "ecr_image_uri": "", @@ -280,9 +279,7 @@ async def query_result(self, query_metadata: Dict) -> Any: ) events = all_log_events["events"] - log_events = "" - for event in events: - log_events += event["message"] + "\n" + log_events = "".join(event["message"] + "\n" for event in events) # output, stdout, stderr return result, log_events, "" diff --git a/requirements.txt b/requirements.txt index 348a558..8fdb178 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -amazon-braket-pennylane-plugin==1.6.9 -boto3==1.24.35 -covalent-aws-plugins>=0.12.0,<1 +amazon-braket-pennylane-plugin>=1.17.4 +boto3>=1.28.5 +covalent-aws-plugins>=0.19.0,<1