Skip to content

Feature Request: @fal.function(kind="uv_venv") as alternative to "virtualenv" #596

@anthonywu

Description

@anthonywu

I noticed the pip install steps of @fal.function was slower than I'd expect it to run on data center bandwidth and caching.

kind: Literal["virtualenv"] = "virtualenv",

def function(
    kind: Literal["virtualenv"] = "virtualenv",  # expand this to include 'uv venv' and then 'uv pip install...'

Modal recently introduced https://modal.com/docs/reference/modal.Image#uv_pip_install which is really nice.

The success criteria would be:

  1. for all usages uv_venv and virtualenv should have no functional or package solver difference, just that fal would benefit from uv performance gains.
  2. Fal's backend should have some sort of background cache for uv (https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration), so that even when the user is not trying to cache, the upstream index/wheels are coming from a fast local cache that uv uses (some sort of mount that user can readonly)

Alternatively, perhaps users can submit our own installation scripts to be run, and from that we can setup the venv with whatever we want (uv, poetry, hatch, tox, anything from the ecosystem)

As far as I can tell, the fal repo does not encompass the server side implementation of the "virtualenv" step, so I think the change cannot be contributed in open source alone.

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