def test_pip_check(image):
    """
    Test to run pip sanity tests
    """
    if "tensorflow-inference" in image:
        pytest.xfail(
            reason="Tensorflow serving api requires tensorflow, but we explicitly do not install"
            "tensorflow in serving containers."
        )

    # Add null entrypoint to ensure command exits immediately
    run_subprocess_cmd(f"docker run --entrypoint='' {image} pip check")
Exemplo n.º 2
0
def docker_client(region):
    test_utils.run_subprocess_cmd(
        f"$(aws ecr get-login --no-include-email --region {region})",
        failure="Failed to log into ECR.",
    )
    return docker.from_env()