<@U06RKAMK0UC> I get `External sources are not sup...
# ask-ai
s
@ancient-wolf-19325 I get
External sources are not supported in pyproject.toml
when I want to use Union's builder and I have pytorch in my pyproject.toml defined with
tool.uv.index
j
Reasoning Complete! 🤖 🔍 Searched knowledge base: I want to look up why you're seeing this error with Union's builder and how it relates to using external sources like pytorch in your pyproject.toml, so I can provide you with the most accurate solution. • Searching over 10 data sources from the following: File, Github File, Github Issue, Web • Found 64 documents that could be relevant from the following data sources: Github File, Github Issue, Github Pull Request, Web Content. • Filtered down to the top 30 most relevant documents. ✍️ Generated answer: I have found a clear explanation for the error and can provide you with the reason and available workarounds.
The error
External sources are not supported in pyproject.toml
occurs because Flytekit's ImageSpec builder (Union's builder) does not support the use of external package sources (such as custom indexes defined under
tool.uv.index
in
pyproject.toml
). The builder expects dependencies to be resolvable from standard sources and does not handle custom or external indexes specified in this way. This limitation is not explicitly documented in the main Flyte docs, but is implied by the error and the default builder's handling of lock files and requirements. To resolve this, use only standard PyPI dependencies in your
pyproject.toml
or requirements file, or specify extra indexes using the
pip_index
or
pip_extra_index_url
parameters in your ImageSpec, rather than through
tool.uv.index
in
pyproject.toml
(source). Would you like more detail on how to configure your dependencies for Union's builder? Sources: - default builder's handling of lock files and requirements 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.