You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Core] Add default excludes for working_dir uploads (#59566)
## Description
Automatically exclude common directories (.git, .venv, venv,
__pycache__) when uploading working_dir in runtime environment packages.
At a minimum we need to exclude `.git/` because unlike the others,
nobody includes .git/ in `.gitignore`. This causes Ray to throw a
`ray.exceptions.RuntimeEnvSetupError` if your `.git` dir is larger than
512 MiB.
I also updated the documentation in handling-dependencies.rst and
improved the error message if the env exceeds the GCS_STORAGE_MAX_SIZE
limit.
## Related issues
N/A
## Additional information
This PR pytorch/tutorials#3709 was failing to
run because the PyTorch tutorials .git/ folder is huge.
---------
Signed-off-by: Ricardo Decal <public@ricardodecal.com>
Signed-off-by: Ricardo Decal <crypdick@users.noreply.github.com>
Signed-off-by: Ricardo Decal <rdecal@anyscale.com>
Co-authored-by: Ricardo Decal <public@ricardodecal.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Copy file name to clipboardExpand all lines: doc/source/ray-core/handling-dependencies.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -507,6 +507,8 @@ The ``runtime_env`` is a Python dictionary or a Python class :class:`ray.runtime
507
507
508
508
Note: By default, if the local directory contains a ``.gitignore`` and/or ``.rayignore`` file, the specified files are not uploaded to the cluster. To disable the ``.gitignore`` from being considered, set ``RAY_RUNTIME_ENV_IGNORE_GITIGNORE=1`` on the machine doing the uploading.
509
509
510
+
Note: By default, common directories (``.git``, ``.venv``, ``venv``, ``__pycache__``) are automatically excluded from the ``working_dir`` upload. You can override these defaults by setting the ``RAY_OVERRIDE_RUNTIME_ENV_DEFAULT_EXCLUDES`` environment variable to a comma-separated list of patterns, or set it to an empty string to disable default excludes entirely.
511
+
510
512
Note: If the local directory contains symbolic links, Ray follows the links and the files they point to are uploaded to the cluster.
511
513
512
514
- ``py_modules`` (List[str|module]): Specifies Python modules to be available for import in the Ray workers. (For more ways to specify packages, see also the ``pip`` and ``conda`` fields below.)
@@ -534,7 +536,6 @@ The ``runtime_env`` is a Python dictionary or a Python class :class:`ray.runtime
534
536
535
537
Note: For option (1), by default, if the local directory contains a ``.gitignore`` and/or ``.rayignore`` file, the specified files are not uploaded to the cluster. To disable the ``.gitignore`` from being considered, set ``RAY_RUNTIME_ENV_IGNORE_GITIGNORE=1`` on the machine doing the uploading.
536
538
537
-
538
539
- ``py_executable`` (str): Specifies the executable used for running the Ray workers. It can include arguments as well. The executable can be
539
540
located in the `working_dir`. This runtime environment is useful to run workers in a custom debugger or profiler as well as to run workers
540
541
in an environment set up by a package manager like `UV` (see :ref:`here <use-uv-for-package-management>`).
0 commit comments