1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 from __future__ import print_function
6 from __future__ import division
12 if "JOB_UUID" in os.environ:
13 requested = arvados.api().jobs().get(uuid=os.environ["JOB_UUID"]).execute()["runtime_constraints"]["min_ram_mb_per_node"]
15 requested = arvados.api().containers().current().execute()["runtime_constraints"]["ram"] // (1024*1024)
17 print("Requested %d expected %d" % (requested, int(sys.argv[1])))
19 exit(0 if requested == int(sys.argv[1]) else 1)