From 5ccf378b79dc9c46ebdce715ea341a8c5364ae9d Mon Sep 17 00:00:00 2001 From: toohsk Date: Thu, 2 Nov 2023 16:22:43 +0900 Subject: [PATCH 1/2] Set ARM64 for CPU architecture. --- app.py | 5 +++++ container/Dockerfile | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 1807a80..efa462e 100644 --- a/app.py +++ b/app.py @@ -16,6 +16,7 @@ Aws, RemovalPolicy, Duration, + DefaultStackSynthesizer, ) from constructs import Construct @@ -144,6 +145,10 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None: task_role=role, cpu=4 * 1024, memory_limit_mib=8 * 1024, + runtime_platform=ecs.RuntimePlatform( + operating_system_family=ecs.OperatingSystemFamily.LINUX, + cpu_architecture=ecs.CpuArchitecture.ARM64 + ), ) container = task_definition.add_container( diff --git a/container/Dockerfile b/container/Dockerfile index 72a3817..b99ed53 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -1,7 +1,9 @@ -FROM python:3.10.12 +FROM --platform=linux/amd64 python:3.10.12 + +RUN pip install -U pip RUN pip install \ - mlflow==2.6.0 \ + mlflow>=2.7.1 \ pymysql==1.0.2 \ boto3 && \ mkdir /mlflow/ From 56f99f1e8b324bb57def08a3aefd13c10cf659c6 Mon Sep 17 00:00:00 2001 From: toohsk Date: Thu, 2 Nov 2023 16:29:53 +0900 Subject: [PATCH 2/2] Remove unneeded changes. --- app.py | 1 - container/Dockerfile | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app.py b/app.py index efa462e..71285f0 100644 --- a/app.py +++ b/app.py @@ -16,7 +16,6 @@ Aws, RemovalPolicy, Duration, - DefaultStackSynthesizer, ) from constructs import Construct diff --git a/container/Dockerfile b/container/Dockerfile index b99ed53..a17f159 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -1,9 +1,7 @@ FROM --platform=linux/amd64 python:3.10.12 -RUN pip install -U pip - RUN pip install \ - mlflow>=2.7.1 \ + mlflow==2.6.0 \ pymysql==1.0.2 \ boto3 && \ mkdir /mlflow/