from truefoundry.deploy import Image, NvidiaGPU, Resources
from truefoundry.workflow import (
ContainerTask,
ContainerTaskConfig,
ExecutionConfig,
FlyteDirectory,
PythonTaskConfig,
TaskPythonBuild,
conditional,
map_task,
task,
workflow,
)
# Python task config example
task_config = PythonTaskConfig(
image=TaskPythonBuild(
python_version="3.9",
pip_packages=["truefoundry[workflow]"],
),
resources=Resources(cpu_request=0.5, cpu_limit=0.5),
service_account="<service-account>",
)
#container task config example
echo = ContainerTask(
name="echo",
task_config=ContainerTaskConfig(
image=Image(
image_uri="bash:4.1",
command=["echo", "hello"],
),
service_account="<service-account>",
),
)
...