-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
First thanks for the great work on uv !
I have a python script that need pytorch. The dependency is defined inside the python script using the inline uv [syntax](https://docs.astral.sh/uv/guides/scripts/?query=script+dependencies#declaring-script-dependencies. The problem is that my entry point to run my code is not python myscript.py but torchrun myscript.py where torchrun is a script entrypoint install with pytorch.
It's an egg and chicken problem because pytorch is not installed so the command will fail, but it won't install pytorch unless I can run the script ...
I would expect to do something like:
uv run --with -R myscript.py torchrun myscript.pythat would read and install the dependencies from myscript.py. I could eventually distribute a separate requirement.txt but It some much cleaner in some cases to only share one file.
Thanks in advance 🙏