truefoundry 0.3.0rc1__tar.gz → 0.3.0rc2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of truefoundry might be problematic. Click here for more details.

Files changed (124) hide show
  1. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/PKG-INFO +4 -2
  2. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/pyproject.toml +4 -2
  3. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/__init__.py +1 -0
  4. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/auto_gen/models.py +118 -2
  5. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/__init__.py +24 -2
  6. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/deployable_patched_models.py +4 -0
  7. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/patched_models.py +18 -0
  8. truefoundry-0.3.0rc2/truefoundry/flyte/__init__.py +6 -0
  9. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/README.md +0 -0
  10. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/__init__.py +0 -0
  11. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/__init__.py +0 -0
  12. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/agents/__init__.py +0 -0
  13. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/agents/base.py +0 -0
  14. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/agents/developer.py +0 -0
  15. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
  16. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/agents/tester.py +0 -0
  17. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/cli.py +0 -0
  18. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/constants.py +0 -0
  19. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/exception.py +0 -0
  20. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/logger.py +0 -0
  21. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/__init__.py +0 -0
  22. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/ask.py +0 -0
  23. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/base.py +0 -0
  24. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/commit.py +0 -0
  25. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  26. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  27. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  28. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/list_files.py +0 -0
  29. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/read_file.py +0 -0
  30. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/send_request.py +0 -0
  31. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/tools/write_file.py +0 -0
  32. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/utils/client.py +0 -0
  33. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/utils/diff.py +0 -0
  34. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  35. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/cli/__init__.py +0 -0
  36. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/cli/__main__.py +0 -0
  37. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  38. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  39. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  40. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  41. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  42. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  43. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/builder/docker_service.py +0 -0
  44. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/__init__.py +0 -0
  45. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/cli.py +0 -0
  46. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  47. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/apply_command.py +0 -0
  48. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/build_command.py +0 -0
  49. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  50. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  51. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  52. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/deploy_command.py +0 -0
  53. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  54. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  55. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/login_command.py +0 -0
  56. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  57. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  58. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/patch_application_command.py +0 -0
  59. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/patch_command.py +0 -0
  60. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  61. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/terminate_comand.py +0 -0
  62. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
  63. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/config.py +0 -0
  64. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/console.py +0 -0
  65. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/const.py +0 -0
  66. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/display_util.py +0 -0
  67. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/cli/util.py +0 -0
  68. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/core/__init__.py +0 -0
  69. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/core/login.py +0 -0
  70. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/core/logout.py +0 -0
  71. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/__init__.py +0 -0
  72. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/__main__.py +0 -0
  73. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/app.py +0 -0
  74. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/build.py +0 -0
  75. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  76. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/remote/context.py +0 -0
  77. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/remote/method.py +0 -0
  78. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/remote/remote.py +0 -0
  79. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/route.py +0 -0
  80. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/service.py +0 -0
  81. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/function_service/utils.py +0 -0
  82. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/io/__init__.py +0 -0
  83. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/io/output_callback.py +0 -0
  84. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  85. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/json_util.py +0 -0
  86. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/__init__.py +0 -0
  87. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/auth/auth_service_client.py +0 -0
  88. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/auth/credential_file_manager.py +0 -0
  89. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/auth/credential_provider.py +0 -0
  90. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/auth/servicefoundry_session.py +0 -0
  91. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/clients/__init__.py +0 -0
  92. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -0
  93. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  94. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/clients/utils.py +0 -0
  95. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/const.py +0 -0
  96. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/dao/__init__.py +0 -0
  97. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/dao/application.py +0 -0
  98. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/dao/apply.py +0 -0
  99. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/dao/version.py +0 -0
  100. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  101. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/exceptions.py +0 -0
  102. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/logs_utils.py +0 -0
  103. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/messages.py +0 -0
  104. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/model/__init__.py +0 -0
  105. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/model/entity.py +0 -0
  106. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/session.py +0 -0
  107. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/util.py +0 -0
  108. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/lib/win32.py +0 -0
  109. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/__init__.py +0 -0
  110. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  111. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/deploy.py +0 -0
  112. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/models.py +0 -0
  113. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/deploy/v2/lib/source.py +0 -0
  114. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/__init__.py +0 -0
  115. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/deprecated.py +0 -0
  116. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/truefoundry_chat.py +0 -0
  117. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/truefoundry_embeddings.py +0 -0
  118. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/truefoundry_llm.py +0 -0
  119. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/langchain/utils.py +0 -0
  120. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/logger.py +0 -0
  121. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/ml/__init__.py +0 -0
  122. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/pydantic_v1.py +0 -0
  123. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/python_deploy_codegen.py +0 -0
  124. {truefoundry-0.3.0rc1 → truefoundry-0.3.0rc2}/truefoundry/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.3.0rc1
3
+ Version: 0.3.0rc2
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com
@@ -10,15 +10,17 @@ Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Provides-Extra: flyte
13
14
  Provides-Extra: ml
14
15
  Requires-Dist: GitPython (>=3.1.43,<3.2.0)
15
16
  Requires-Dist: Mako (>=1.1.6,<2.0.0)
16
17
  Requires-Dist: PyJWT (>=2.0.0,<3.0.0)
17
18
  Requires-Dist: PyYAML (>=6.0.0,<7.0.0)
18
19
  Requires-Dist: click (>=7.0.0,<9.0.0)
19
- Requires-Dist: docker (>=7.0.0,<8.0.0)
20
+ Requires-Dist: docker (>=6.1.2,<8.0.0)
20
21
  Requires-Dist: fastapi (>=0.56.0,<0.200.0)
21
22
  Requires-Dist: filelock (>=3.8.0,<4.0.0)
23
+ Requires-Dist: flytekit (==1.12.2) ; extra == "flyte"
22
24
  Requires-Dist: gitignorefile (>=1.1.2,<1.2.0)
23
25
  Requires-Dist: importlib-metadata (>=6.0.1,<8.0.0)
24
26
  Requires-Dist: importlib-resources (>=5.2.0,<6.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "truefoundry"
3
- version = "0.3.0rc1"
3
+ version = "0.3.0rc2"
4
4
  description = "Truefoundry CLI"
5
5
  authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
6
6
  readme = "README.md"
@@ -8,7 +8,8 @@ readme = "README.md"
8
8
  [tool.poetry.dependencies]
9
9
  python = ">=3.8.1,<3.13"
10
10
  click = ">=7.0.0,<9.0.0"
11
- docker = ">=7.0.0,<8.0.0"
11
+ flytekit = {version = "1.12.2", optional = true}
12
+ docker = ">=6.1.2,<8.0.0"
12
13
  fastapi = ">=0.56.0,<0.200.0"
13
14
  filelock = "^3.8.0"
14
15
  gitignorefile = ">=1.1.2,<1.2.0"
@@ -38,6 +39,7 @@ yq = "^3.1.0"
38
39
 
39
40
  [tool.poetry.extras]
40
41
  ml = ["mlfoundry"]
42
+ flyte = ["flytekit"]
41
43
 
42
44
  [tool.poetry.group.dev.dependencies]
43
45
  ruff = ">=0.4.10"
@@ -38,6 +38,7 @@ from truefoundry.deploy.v2.lib.deployable_patched_models import (
38
38
  Service,
39
39
  SSHServer,
40
40
  Volume,
41
+ Workflow,
41
42
  )
42
43
  from truefoundry.deploy.v2.lib.patched_models import (
43
44
  AMQPInputConfig,
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: application.json
3
- # timestamp: 2024-07-09T08:17:00+00:00
3
+ # timestamp: 2024-07-05T13:46:01+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -795,7 +795,7 @@ class PythonBuild(BaseModel):
795
795
  )
796
796
  command: Union[str, List[str]] = Field(
797
797
  ...,
798
- description="Command will be set as the Entrypoint of the generated\nimage.\n+label=Command\n+usage=Command to run when the container starts.\nCommand will be set as the Entrypoint of the generated image.\nWhen deploying a Job, the command can be templatized by defining `params` and referencing them in command\nE.g. `python main.py --learning_rate {{learning_rate}}`",
798
+ description="Command will be set as the Entrypoint of the generatede\nimage.\n+label=Command\n+usage=Command to run when the container starts.\nCommand will be set as the Entrypoint of the generated image.\nWhen deploying a Job, the command can be templatized by defining `params` and referencing them in command\nE.g. `python main.py --learning_rate {{learning_rate}}`",
799
799
  )
800
800
  cuda_version: Optional[
801
801
  constr(
@@ -1050,6 +1050,59 @@ class StringDataMount(BaseModel):
1050
1050
  data: str = Field(..., description="+label=Data\n+usage=The file content.")
1051
1051
 
1052
1052
 
1053
+ class TaskDockerFileBuild(BaseModel):
1054
+ """
1055
+ +docs=Describes the configuration for the docker build for a task
1056
+ +label=Docker File
1057
+ +icon=fa-brands fa-docker:#0db7ed
1058
+ """
1059
+
1060
+ type: Literal["task-dockerfile-build"] = Field(..., description="+value=dockerfile")
1061
+ dockerfile_path: str = Field(
1062
+ "./Dockerfile",
1063
+ description="+label=Path to Dockerfile\n+usage=The file path of the Dockerfile relative to project root path.",
1064
+ )
1065
+ build_args: Optional[Dict[str, str]] = Field(
1066
+ None, description="+label=Build arguments to pass to docker build"
1067
+ )
1068
+
1069
+
1070
+ class TaskPythonBuild(BaseModel):
1071
+ """
1072
+ +docs=Describes the configuration for the python build for a task
1073
+ +label=Python Buid Spec
1074
+ +icon=fa-brands fa-python:#306998
1075
+ """
1076
+
1077
+ type: Literal["task-python-build"] = Field(
1078
+ ..., description="+value=task-python-build"
1079
+ )
1080
+ python_version: constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$") = Field(
1081
+ "3.9",
1082
+ description="+label=Python version\n+usage=Python version to run your application. Should be one of the tags listed on [Official Python Docker Page](https://hub.docker.com/_/python)\n+message=Please enter a valid Python version tag",
1083
+ )
1084
+ requirements_path: Optional[str] = Field(
1085
+ None,
1086
+ description="`Path to build context`\n+label=Path to requirements\n+usage=Path to `requirements.txt` relative to\n`Path to build context`",
1087
+ )
1088
+ pip_packages: Optional[List[str]] = Field(
1089
+ None,
1090
+ description='+label=Pip packages to install\n+usage=Define pip package requirements.\nIn Python/YAML E.g. ["fastapi>=0.90,<1.0", "uvicorn"]\n+placeholder=Enter a pip package name E.g. fastapi>=0.90,<1.0',
1091
+ )
1092
+ apt_packages: Optional[List[str]] = Field(
1093
+ None,
1094
+ description='+label=List of Debian packages to install.\n+usage=Debian packages to install via `apt get`.\nIn Python/YAML E.g. ["git", "ffmpeg", "htop"]\n+placeholder=Enter a debian package name E.g. ffmpeg',
1095
+ )
1096
+ cuda_version: Optional[
1097
+ constr(
1098
+ regex=r"^((\d+\.\d+(\.\d+)?-cudnn\d+-(runtime|devel)-ubuntu\d+\.\d+)|11\.0-cudnn8|11\.1-cudnn8|11\.2-cudnn8|11\.3-cudnn8|11\.4-cudnn8|11\.5-cudnn8|11\.6-cudnn8|11\.7-cudnn8|11\.8-cudnn8|12\.0-cudnn8|12\.1-cudnn8|12\.2-cudnn8)$"
1099
+ )
1100
+ ] = Field(
1101
+ None,
1102
+ description="+label=CUDA Version\n+usage=Version of CUDA Toolkit and CUDNN to install in the image\nThese combinations are based off of publically available docker images on docker hub\nYou can also specify a valid tag of the form {cuda_version_number}-cudnn{cudnn_version_number}-{runtime|devel}-ubuntu{ubuntu_version}\nRefer https://hub.docker.com/r/nvidia/cuda/tags for valid set of values\nNote: We use deadsnakes ubuntu ppa to add Python that currently supports only Ubuntu 18.04, 20.04 and 22.04",
1103
+ )
1104
+
1105
+
1053
1106
  class TruefoundryArtifactSource(BaseModel):
1054
1107
  """
1055
1108
  +docs=Input for Artifact from Truefoundry Artifact Registry
@@ -1185,6 +1238,34 @@ class VolumeMount(BaseModel):
1185
1238
  )
1186
1239
 
1187
1240
 
1241
+ class Workflow(BaseModel):
1242
+ """
1243
+ +docs=Describes the configuration for the worflow
1244
+ """
1245
+
1246
+ type: constr(regex=r"^workflow$") = Field(..., description="+value=workflow")
1247
+ name: constr(regex=r"^[a-z][a-z0-9\-]{1,30}[a-z0-9]$") = Field(
1248
+ ...,
1249
+ description="+usage=Name of the workflow\n+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number",
1250
+ )
1251
+ source: Union[LocalSource, RemoteSource] = Field(
1252
+ ...,
1253
+ description="+docs=Source Code for the workflow, either local or remote\n+label=Source Code for your workflow\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=200",
1254
+ )
1255
+ env: Optional[Dict[str, str]] = Field(
1256
+ None,
1257
+ description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=500",
1258
+ )
1259
+ docker_registry: Optional[str] = Field(
1260
+ None,
1261
+ description="+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+usage=FQN of the container registry. If you can't find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page",
1262
+ )
1263
+ flyte_entities: List[Dict[str, Any]] = Field(
1264
+ ...,
1265
+ description="+docs=These\n+label=Flyte Entities\nActually ContainerTaskConfig and PythonTaskConfig are not flyte entities, this is just for code generation",
1266
+ )
1267
+
1268
+
1188
1269
  class ArtifactsDownload(BaseModel):
1189
1270
  """
1190
1271
  +docs=Describes the configuration for the artifacts cache
@@ -1287,6 +1368,21 @@ class Codeserver(BaseWorkbenchInput):
1287
1368
  auth: Optional[BasicAuthCreds] = None
1288
1369
 
1289
1370
 
1371
+ class ContainerTaskConfig(BaseModel):
1372
+ type: constr(regex=r"^container-task-config$") = Field(
1373
+ ..., description="+value=container-task-config"
1374
+ )
1375
+ image: Union[Build, Image] = Field(
1376
+ ...,
1377
+ description="+docs=Specify whether you want to deploy a Docker image or build and deploy from source code\n+label=Deploy a Docker image or build and deploy from source code\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=200",
1378
+ )
1379
+ env: Optional[Dict[str, str]] = Field(
1380
+ None,
1381
+ description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the task either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=200",
1382
+ )
1383
+ resources: Optional[Resources] = None
1384
+
1385
+
1290
1386
  class CoreNATSOutputConfig(BaseModel):
1291
1387
  """
1292
1388
  +docs=Describes the configuration for the output Core NATS worker
@@ -1523,6 +1619,25 @@ class Notebook(BaseWorkbenchInput):
1523
1619
  )
1524
1620
 
1525
1621
 
1622
+ class PythonTaskConfig(BaseModel):
1623
+ """
1624
+ +docs=Describes the configuration for the python function task
1625
+ """
1626
+
1627
+ type: constr(regex=r"^python-task-config$") = Field(
1628
+ ..., description="+value=python-task-config"
1629
+ )
1630
+ image: Union[TaskPythonBuild, TaskDockerFileBuild] = Field(
1631
+ ...,
1632
+ description="+label=Image Spec\n+docs=Specification for the image to be used for the task\n+sort=100\n+usage=Specify the image spec for the task",
1633
+ )
1634
+ env: Optional[Dict[str, str]] = Field(
1635
+ None,
1636
+ description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the task either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=200",
1637
+ )
1638
+ resources: Optional[Resources] = None
1639
+
1640
+
1526
1641
  class SSHServer(BaseWorkbenchInput):
1527
1642
  """
1528
1643
  +docs=Describes the configuration for the ssh server
@@ -1672,4 +1787,5 @@ class Application(BaseModel):
1672
1787
  Helm,
1673
1788
  Volume,
1674
1789
  ApplicationSet,
1790
+ Workflow,
1675
1791
  ]
@@ -1,6 +1,11 @@
1
1
  from typing import Dict, List, Optional, Union
2
2
 
3
- from truefoundry.deploy.auto_gen.models import DockerFileBuild, PythonBuild
3
+ from truefoundry.deploy.auto_gen.models import (
4
+ DockerFileBuild,
5
+ PythonBuild,
6
+ TaskDockerFileBuild,
7
+ TaskPythonBuild,
8
+ )
4
9
  from truefoundry.deploy.builder.builders import get_builder
5
10
  from truefoundry.deploy.builder.builders.tfy_notebook_buildpack.dockerfile_template import (
6
11
  NotebookImageBuild,
@@ -11,7 +16,13 @@ from truefoundry.pydantic_v1 import BaseModel
11
16
  class _BuildConfig(BaseModel):
12
17
  # I cannot use Field(discriminator="build_config_type") here as
13
18
  # build_config_type in the build configs is not a Literal.
14
- __root__: Union[DockerFileBuild, PythonBuild, NotebookImageBuild]
19
+ __root__: Union[
20
+ DockerFileBuild,
21
+ PythonBuild,
22
+ NotebookImageBuild,
23
+ TaskPythonBuild,
24
+ TaskDockerFileBuild,
25
+ ]
15
26
 
16
27
 
17
28
  def build(
@@ -20,6 +31,17 @@ def build(
20
31
  extra_opts: Optional[List[str]] = None,
21
32
  ):
22
33
  build_configuration = _BuildConfig.parse_obj(build_configuration).__root__
34
+ if isinstance(build_configuration, TaskPythonBuild):
35
+ build_configuration_dict = build_configuration.dict()
36
+ build_configuration_dict.update(
37
+ {"type": "tfy-python-buildpack", "command": "python"}
38
+ )
39
+ build_configuration = PythonBuild.parse_obj(build_configuration_dict)
40
+ if isinstance(build_configuration, TaskDockerFileBuild):
41
+ build_configuration_dict = build_configuration.dict()
42
+ build_configuration_dict.update({"type": "dockerfile"})
43
+ build_configuration = DockerFileBuild.parse_obj(build_configuration_dict)
44
+
23
45
  builder = get_builder(build_configuration.type)
24
46
  return builder(
25
47
  build_configuration=build_configuration,
@@ -66,3 +66,7 @@ class Application(models.Application, DeployablePatchedModelBase):
66
66
  return deploy_component(
67
67
  component=self.__root__, workspace_fqn=workspace_fqn, wait=wait
68
68
  )
69
+
70
+
71
+ class Workflow(models.Workflow, DeployablePatchedModelBase):
72
+ type: Literal["workflow"] = "workflow"
@@ -495,3 +495,21 @@ class DynamicVolumeConfig(models.DynamicVolumeConfig, PatchedModelBase):
495
495
 
496
496
  class StaticVolumeConfig(models.StaticVolumeConfig, PatchedModelBase):
497
497
  type: Literal["static"] = "static"
498
+
499
+
500
+ class PythonTaskConfig(models.PythonTaskConfig, PatchedModelBase):
501
+ type: Literal["python-task-config"] = "python-task-config"
502
+ resources: Optional[Resources] = Resources()
503
+
504
+
505
+ class ContainerTaskConfig(models.ContainerTaskConfig, PatchedModelBase):
506
+ type: Literal["container-task-config"] = "container-task-config"
507
+ resources: Optional[Resources] = Resources()
508
+
509
+
510
+ class TaskDockerFileBuild(models.TaskDockerFileBuild, PatchedModelBase):
511
+ type: Literal["task-dockerfile-build"] = "task-dockerfile-build"
512
+
513
+
514
+ class TaskPythonBuild(models.TaskPythonBuild, PatchedModelBase):
515
+ type: Literal["task-python-build"] = "task-python-build"
@@ -0,0 +1,6 @@
1
+ from truefoundry.deploy.v2.lib.patched_models import (
2
+ ContainerTaskConfig,
3
+ PythonTaskConfig,
4
+ TaskDockerFileBuild,
5
+ TaskPythonBuild,
6
+ )
File without changes