1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
9 if "JOB_UUID" in os.environ:
10 requested = arvados.api().jobs().get(uuid=os.environ["JOB_UUID"]).execute()["runtime_constraints"]["min_ram_mb_per_node"]
12 requested = arvados.api().containers().current().execute()["runtime_constraints"]["ram"]/(1024*1024)
14 print("Requested %d expected %d" % (requested, int(sys.argv[1])))
16 exit(0 if requested == int(sys.argv[1]) else 1)