Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSProcessing] Update EMRS image to 7.1.0, add file in image to ensure we recognize execution env. #943

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG ARCH=x86_64
FROM public.ecr.aws/emr-serverless/spark/emr-7.0.0:20240206-${ARCH} as base
FROM public.ecr.aws/emr-serverless/spark/emr-7.1.0:20240528-${ARCH} as base

USER root
ENV PYTHON_VERSION=3.9.18
Expand Down Expand Up @@ -40,6 +40,8 @@ else \
python3 -c "from transformers import AutoModel; AutoModel.from_pretrained('${MODEL}')"; \
fi

# We use this file as an indicator of the execution environment
RUN touch /usr/lib/spark/code/EMR_SERVERLESS_EXECUTION

# GSProcessing codebase
COPY code/ /usr/lib/spark/code/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,10 @@ def main():
format="[GSPROCESSING] %(asctime)s %(levelname)-8s %(message)s",
)

# Determine if we're running within a SageMaker container
# Determine execution environment
if os.path.exists("/opt/ml/config/processingjobconfig.json"):
execution_env = ExecutionEnv.SAGEMAKER
elif os.path.exists("/emr-serverless-config.json"):
elif os.path.exists("/usr/lib/spark/code/EMR_SERVERLESS_EXECUTION"):
execution_env = ExecutionEnv.EMR_SERVERLESS
elif os.path.exists("/usr/lib/spark/code/EMR_EXECUTION"):
execution_env = ExecutionEnv.EMR_ON_EC2
Expand Down
Loading