Skip to content

Document uv installation example. #57

@alxmrs

Description

@alxmrs

For torch + cuda projects, it seems like the community is centering around managing dependencies with uv. To help users who use all three of these tools, I bet it would be useful to include such documentation in a "how to install" section. To that end, here is how I got this library installed in my project:

According to this comment (astral-sh/uv#1715 (comment)), it seems that earth2grid can be installed with the following two step process:

uv add https://github.com/NVlabs/earth2grid/archive/main.tar.gz
uv sync --no-install-package earth2grid

This should modify the pyproject.toml to have something like the following configuration (it may require manual modification):

# ...
dependencies = [
    # ...
    "earth2grid",
]
# ...
[tool.uv.sources]
earth2grid = { url = "https://github.com/NVlabs/earth2grid/archive/main.tar.gz" }

[tool.uv]
no-build-isolation-package = ["earth2grid"]

This should ensure that earth2grid is installed correctly in uv-managed projects.

(see https://docs.astral.sh/uv/reference/settings/#no-build-isolation-package)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions