Skip to content

emod_exp

update_docker_image()

Updates the EMOD-Hub Ubuntu runtime image to include emod-api

Args:

Returns:

Source code in local_python/emod_exp.py
def update_docker_image():
    """
    Updates the EMOD-Hub Ubuntu runtime image to include emod-api

    Args:

    Returns:

    """

    # Path to Dockerfile
    f_dir = os.path.dirname(os.path.abspath(__file__))
    dockerfile = os.path.join(f_dir, 'container_assets', 'Dockerfile')

    # Build image locally
    cmd = ['docker', 'build', '-t', LOCAL_DOCK_PACK, '-f', dockerfile, '.']
    p = subprocess.Popen(cmd)
    p.wait()

    return None