def cmd_e2e_run(args):
    """Run e2e tests for all examples and templates in separate docker images"""
    for project_dir in EXAMPLE_DIRECTORIES + TEMPLATE_DIRECTORIES:
        container_name = project_dir.parts[-1]
        image_tag = (
            f"component-template:py-{args.python_version}-st-{args.streamlit_version}-component-{container_name}"
        )
        e2e_dir = next(project_dir.glob("**/e2e/"), None)
        if e2e_dir and os.listdir(e2e_dir):
            run_verbose([
                "docker",
                "run",
                "--tty",
                "--rm",
                "--name", container_name,
                "--volume", f"{e2e_dir.parent}/:/component/",
                image_tag,
                "/bin/sh", "-c",  # Run a shell command inside the container
                "find /component/dist/ -name '*.whl' | xargs -I {} echo '{}[devel]' | xargs pip install && " # Install whl package and dev dependencies
                f"pytest -s --browser webkit --browser chromium --browser firefox --reruns 5 --capture=no"  # Run pytest
            ])
Run e2e tests for all examples and templates in separate docker images
dev.py