square-agency-59624
09/11/2025, 1:42 PMancient-wolf-19325
09/11/2025, 1:42 PMpip_extra_index_url or pip_index parameter in the ImageSpec when building custom images for your tasks. There is no documented method to inject this setting globally at the Flyte deployment or cluster level for all user containers—each image must be configured individually at build time using Flytekit's ImageSpec or a Dockerfile as needed.
For example, you can set it like this in your task's image spec:
from flytekit import ImageSpec
image_spec = ImageSpec(
packages=["torch", "torchvision"],
pip_extra_index_url=["https://download.pytorch.org/whl/cu118"],
registry="ghcr.io/flyteorg",
)
or
image_spec = ImageSpec(
packages=["..."],
pip_index="https://private-pip-index/simple",
registry="...",
)
See Flyte ImageSpec documentation and Flyte 1.8 release notes for details. Would you like more detail on how to automate this for multiple images or tasks?
Sources:
- Flyte ImageSpec documentation
- Flyte 1.8 release notes 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.