cuddly-jelly-27016
05/15/2025, 12:11 AMtask.virtualenv
(see here for more details). These will then be installed before the task runs.
Flyte's implementation could follow the same idea by adding a requirements
parameter to its task
decorator:
@task(requirements=["colorama==0.4.0"], ...)
def my_task(...):
...
As far as a I understand, AirFlow creates a new virtual environment to install these dependencies into. In Flyte it is probably okay installing them into the active environment directly?
### Describe alternatives you've considered
Some more ideas that were shared on Slack:
• Allow specifying an init script that runs before the task. This init script could run pip install -r requirements.txt
, and even more things beyond solving just this issue (eg. installing dependencies with apt
).
• Specify a path to a requirements.txt
file instead of listing all dependencies in the task decorator
### Propose: Link/Inline OR Additional context
Thread about this on Slack: https://flyte-org.slack.com/archives/CNMKCU6FR/p1653428501588649?thread_ts=1653428501.588649&cid=CNMKCU6FR
### Are you sure this issue hasn't been raised already?
• Yes
### Have you read the Code of Conduct?
• Yes
flyteorg/flytecuddly-jelly-27016
05/15/2025, 12:11 AM