in dags/map_reproducibility/utils/common_utils.py [0:0]
def get_internal_docker_image(hardware: str, framework: str):
"""
Returns the appropriate Docker image based on the given hardware, model, and framework.
Args:
hardware: The hardware type (e.g., "a3ultra", "a3mega").
framework: The framework (e.g., "nemo", "maxtext").
Returns:
A Docker image string or None if no image is defined for the given combination.
"""
utc_date = datetime.now(timezone.utc).strftime("%Y-%m-%d")
image_map = {
"a3ultra": {
"nemo": "us-central1-docker.pkg.dev/deeplearning-images/reproducibility/pytorch-gpu-nemo-nccl:nemo24.07-gib1.0.3-A3U",
"maxtext": f"gcr.io/tpu-prod-env-multipod/maxtext_gpu_stable_stack_nightly_jax:{utc_date}",
},
"a3mega": {
"nemo": "us-central1-docker.pkg.dev/deeplearning-images/reproducibility/pytorch-gpu-nemo:nemo24.07-A3Mega",
"maxtext": f"gcr.io/tpu-prod-env-multipod/maxtext_gpu_stable_stack_nightly_jax:{utc_date}",
},
}
if hardware in image_map:
if framework in image_map[hardware]:
return image_map[hardware][framework]
return None # Return None if no image is found for the given combination