acoustic-carpenter-78188
12/03/2025, 12:50 AMfile:// dependencies in uvscript files, improving image building workflows to include these projects as layers. The changes parse and separate standard dependencies from local project references, update image layer construction to include these projects, and ensure proper hashing and Dockerfile generation for reproducible builds.
• Updated parse_uv_script_file in uv_script_parser.py to distinguish between standard dependencies and local projects (file://), storing them separately in the UVScriptMetadata dataclass. This enables downstream logic to handle local projects distinctly from regular dependencies. [1] [2]
• Use the with_uv_project to install the local project
# /// script
# dependencies = [
# "polars",
# "ty",
# "mypy",
# "flyte @ file:///Users/kevin/git/flyte-sdk",
# ]
# ///
import polars as pl
import flyte
env = flyte.TaskEnvironment(
name="hello_world",
image=flyte.Image.from_uv_script(file, name="flyte", registry="ghcr.io/flyteorg"),
)
@env.task
async def create_dataframe() -> pl.DataFrame:
return pl.DataFrame(
{"name": ["Alice", "Bob", "Charlie"], "age": [25, 32, 37], "city": ["New York", "Paris", "Berlin"]}
)
@env.task
async def print_dataframe(dataframe: pl.DataFrame):
print(dataframe)
@env.task
async def workflow():
df = await create_dataframe()
await print_dataframe(df)
if name == "__main__":
flyte.init_from_config()
r = flyte.run(workflow)
print(r)
flyteorg/flyte-sdkacoustic-carpenter-78188
12/09/2025, 1:11 AM