prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  [BUG] Command "nvflare" not found 
  Unfortunately I can't run nvflare on Ubuntu because it tells me that the command (`nvflare simulator -h`) is not found. Even if I use the Docker solution. Inside the docker it also shows "command not found". Thus unable to run local experiments.
  
  I tried the MWE from https://nvflare.readthedocs.io/en/2.2.1/getting_started.html
  
  Used OS: Ubuntu 18.04.5 LTS
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `docs/conf.py`
  Content:
  ```
  1 # Copyright (c) 2021, NVIDIA CORPORATION.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 # Configuration file for the Sphinx documentation builder.
  16 #
  17 # This file only contains a selection of the most common options. For a full
  18 # list see the documentation:
  19 # http://www.sphinx-doc.org/en/master/config
  20 
  21 # -- Path setup --------------------------------------------------------------
  22 
  23 # If extensions (or modules to document with autodoc) are in another directory,
  24 # add these directories to sys.path here. If the directory is relative to the
  25 # documentation root, use os.path.abspath to make it absolute, like shown here.
  26 #
  27 import sphinx_rtd_theme
  28 import os
  29 import sys
  30 from sphinx.domains.python import PythonDomain
  31 import subprocess
  32 
  33 
  34 class PatchedPythonDomain(PythonDomain):
  35     def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
  36         if "refspecific" in node:
  37             del node["refspecific"]
  38         return super(PatchedPythonDomain, self).resolve_xref(env, fromdocname, builder, typ, target, node, contnode)
  39 
  40 
  41 sys.path.insert(0, os.path.abspath(".."))
  42 print(sys.path)
  43 
  44 # -- Project information -----------------------------------------------------
  45 
  46 project = "NVIDIA FLARE"
  47 copyright = "2022, NVIDIA"
  48 author = "NVIDIA"
  49 
  50 # The full version, including alpha/beta/rc tags
  51 release = "2.2.1"
  52 version = "2.2.1"
  53 
  54 
  55 # -- General configuration ---------------------------------------------------
  56 
  57 # Add any Sphinx extension module names here, as strings. They can be
  58 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  59 # ones.
  60 # Add napoleon to the extensions list
  61 # source_parsers = {'.md': CommonMarkParser}
  62 
  63 templates_path = ["templates"]
  64 
  65 source_suffix = {
  66     ".rst": "restructuredtext",
  67     ".txt": "restructuredtext",
  68     ".md": "markdown",
  69 }
  70 
  71 extensions = [
  72     "recommonmark",
  73     "sphinx.ext.intersphinx",
  74     "sphinx.ext.mathjax",
  75     "sphinx.ext.napoleon",
  76     "sphinx.ext.autodoc",
  77     "sphinx.ext.viewcode",
  78     "sphinx.ext.autosectionlabel",
  79 ]
  80 
  81 autoclass_content = "both"
  82 add_module_names = False
  83 autosectionlabel_prefix_document = True
  84 
  85 # Add any paths that contain templates here, relative to this directory.
  86 # templates_path = ['_templates']
  87 
  88 # List of patterns, relative to source directory, that match files and
  89 # directories to ignore when looking for source files.
  90 # This pattern also affects html_static_path and html_extra_path.
  91 exclude_patterns = []
  92 
  93 
  94 # -- Options for HTML output -------------------------------------------------
  95 
  96 # The theme to use for HTML and HTML Help pages.  See the documentation for
  97 # a list of builtin themes.
  98 #
  99 html_theme = "sphinx_rtd_theme"
  100 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  101 html_theme_options = {
  102     "collapse_navigation": True,
  103     "display_version": True,
  104     "navigation_depth": 5,
  105     "sticky_navigation": True,  # Set to False to disable the sticky nav while scrolling.
  106     # 'logo_only': True,  # if we have a html_logo below, this shows /only/ the logo with no title text
  107 }
  108 html_scaled_image_link = False
  109 html_show_sourcelink = True
  110 html_favicon = "favicon.ico"
  111 
  112 # Add any paths that contain custom static files (such as style sheets) here,
  113 # relative to this directory. They are copied after the builtin static files,
  114 # so a file named "default.css" will overwrite the builtin "default.css".
  115 html_static_path = ["_static"]
  116 
  117 
  118 def generate_apidocs(*args):
  119     """Generate API docs automatically by trawling the available modules"""
  120     module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "nvflare"))
  121     output_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "apidocs"))
  122     print(f"output_path {output_path}")
  123     print(f"module_path {module_path}")
  124     subprocess.check_call(
  125         [sys.executable, "-m", "sphinx.ext.apidoc", "-f", "-e"]
  126         + ["-o", output_path]
  127         + [module_path]
  128         + [os.path.join(module_path, p) for p in exclude_patterns]
  129     )
  130 
  131 
  132 def setup(app):
  133     app.connect("builder-inited", generate_apidocs)
  134     app.add_domain(PatchedPythonDomain, override=True)
  135     app.add_css_file("css/additions.css")
  136
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/docs/conf.py b/docs/conf.py
  --- a/docs/conf.py
  +++ b/docs/conf.py
  @@ -76,6 +76,7 @@
       "sphinx.ext.autodoc",
       "sphinx.ext.viewcode",
       "sphinx.ext.autosectionlabel",
  +    "sphinx_copybutton",
   ]
   
   autoclass_content = "both"
  
verification_info: {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -76,6 +76,7 @@\n     \"sphinx.ext.autodoc\",\n     \"sphinx.ext.viewcode\",\n     \"sphinx.ext.autosectionlabel\",\n+    \"sphinx_copybutton\",\n ]\n \n autoclass_content = \"both\"\n", "issue": "[BUG] Command \"nvflare\" not found \nUnfortunately I can't run nvflare on Ubuntu because it tells me that the command (`nvflare simulator -h`) is not found. Even if I use the Docker solution. Inside the docker it also shows \"command not found\". Thus unable to run local experiments.\r\n\r\nI tried the MWE from https://nvflare.readthedocs.io/en/2.2.1/getting_started.html\r\n\r\nUsed OS: Ubuntu 18.04.5 LTS\r\n\n", "before_files": [{"content": "# Copyright (c) 2021, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport sphinx_rtd_theme\nimport os\nimport sys\nfrom sphinx.domains.python import PythonDomain\nimport subprocess\n\n\nclass PatchedPythonDomain(PythonDomain):\n    def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):\n        if \"refspecific\" in node:\n            del node[\"refspecific\"]\n        return super(PatchedPythonDomain, self).resolve_xref(env, fromdocname, builder, typ, target, node, contnode)\n\n\nsys.path.insert(0, os.path.abspath(\"..\"))\nprint(sys.path)\n\n# -- Project information -----------------------------------------------------\n\nproject = \"NVIDIA FLARE\"\ncopyright = \"2022, NVIDIA\"\nauthor = \"NVIDIA\"\n\n# The full version, including alpha/beta/rc tags\nrelease = \"2.2.1\"\nversion = \"2.2.1\"\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\n# Add napoleon to the extensions list\n# source_parsers = {'.md': CommonMarkParser}\n\ntemplates_path = [\"templates\"]\n\nsource_suffix = {\n    \".rst\": \"restructuredtext\",\n    \".txt\": \"restructuredtext\",\n    \".md\": \"markdown\",\n}\n\nextensions = [\n    \"recommonmark\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.autosectionlabel\",\n]\n\nautoclass_content = \"both\"\nadd_module_names = False\nautosectionlabel_prefix_document = True\n\n# Add any paths that contain templates here, relative to this directory.\n# templates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\nhtml_theme_options = {\n    \"collapse_navigation\": True,\n    \"display_version\": True,\n    \"navigation_depth\": 5,\n    \"sticky_navigation\": True,  # Set to False to disable the sticky nav while scrolling.\n    # 'logo_only': True,  # if we have a html_logo below, this shows /only/ the logo with no title text\n}\nhtml_scaled_image_link = False\nhtml_show_sourcelink = True\nhtml_favicon = \"favicon.ico\"\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n\ndef generate_apidocs(*args):\n    \"\"\"Generate API docs automatically by trawling the available modules\"\"\"\n    module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\", \"nvflare\"))\n    output_path = os.path.abspath(os.path.join(os.path.dirname(__file__), \"apidocs\"))\n    print(f\"output_path {output_path}\")\n    print(f\"module_path {module_path}\")\n    subprocess.check_call(\n        [sys.executable, \"-m\", \"sphinx.ext.apidoc\", \"-f\", \"-e\"]\n        + [\"-o\", output_path]\n        + [module_path]\n        + [os.path.join(module_path, p) for p in exclude_patterns]\n    )\n\n\ndef setup(app):\n    app.connect(\"builder-inited\", generate_apidocs)\n    app.add_domain(PatchedPythonDomain, override=True)\n    app.add_css_file(\"css/additions.css\")\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Copyright (c) 2021, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport sphinx_rtd_theme\nimport os\nimport sys\nfrom sphinx.domains.python import PythonDomain\nimport subprocess\n\n\nclass PatchedPythonDomain(PythonDomain):\n    def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):\n        if \"refspecific\" in node:\n            del node[\"refspecific\"]\n        return super(PatchedPythonDomain, self).resolve_xref(env, fromdocname, builder, typ, target, node, contnode)\n\n\nsys.path.insert(0, os.path.abspath(\"..\"))\nprint(sys.path)\n\n# -- Project information -----------------------------------------------------\n\nproject = \"NVIDIA FLARE\"\ncopyright = \"2022, NVIDIA\"\nauthor = \"NVIDIA\"\n\n# The full version, including alpha/beta/rc tags\nrelease = \"2.2.1\"\nversion = \"2.2.1\"\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\n# Add napoleon to the extensions list\n# source_parsers = {'.md': CommonMarkParser}\n\ntemplates_path = [\"templates\"]\n\nsource_suffix = {\n    \".rst\": \"restructuredtext\",\n    \".txt\": \"restructuredtext\",\n    \".md\": \"markdown\",\n}\n\nextensions = [\n    \"recommonmark\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.autosectionlabel\",\n    \"sphinx_copybutton\",\n]\n\nautoclass_content = \"both\"\nadd_module_names = False\nautosectionlabel_prefix_document = True\n\n# Add any paths that contain templates here, relative to this directory.\n# templates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\nhtml_theme_options = {\n    \"collapse_navigation\": True,\n    \"display_version\": True,\n    \"navigation_depth\": 5,\n    \"sticky_navigation\": True,  # Set to False to disable the sticky nav while scrolling.\n    # 'logo_only': True,  # if we have a html_logo below, this shows /only/ the logo with no title text\n}\nhtml_scaled_image_link = False\nhtml_show_sourcelink = True\nhtml_favicon = \"favicon.ico\"\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n\ndef generate_apidocs(*args):\n    \"\"\"Generate API docs automatically by trawling the available modules\"\"\"\n    module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\", \"nvflare\"))\n    output_path = os.path.abspath(os.path.join(os.path.dirname(__file__), \"apidocs\"))\n    print(f\"output_path {output_path}\")\n    print(f\"module_path {module_path}\")\n    subprocess.check_call(\n        [sys.executable, \"-m\", \"sphinx.ext.apidoc\", \"-f\", \"-e\"]\n        + [\"-o\", output_path]\n        + [module_path]\n        + [os.path.join(module_path, p) for p in exclude_patterns]\n    )\n\n\ndef setup(app):\n    app.connect(\"builder-inited\", generate_apidocs)\n    app.add_domain(PatchedPythonDomain, override=True)\n    app.add_css_file(\"css/additions.css\")\n", "path": "docs/conf.py"}]}