A step-by-step guide to building, deploying, and iterating on Flyte tasks and workflows
We recommend using an OSX or a Linux machine, as we have not tested this on Windows. If you happen to test it, please let us know.
Implement Your Workflows in Python¶
Start a new project / repository¶
pip3 install flytekit --upgrade git clone https://github.com/flyteorg/flytekit-python-template.git myflyteapp cd myflyteapp
The repo comes with a sample workflow, which can be found under
myapp/workflows/example.py. The structure below shows the most important files and how a typical Flyte app should be laid out.
A typical Flyte app should have these files
. ├── Dockerfile ├── docker_build_and_tag.sh ├── myapp │ ├── __init__.py │ └── workflows │ ├── __init__.py │ └── example.py └── requirements.txt
Two things to note here:
You can use pip-compile to build your requirements file.
The Dockerfile that comes with this is not GPU ready, but is a simple Dockerfile that should work for most of your apps.
Run the Workflow Locally¶
The workflow can be run locally, simply by running it as a Python script; note the
__main__ entry point at the bottom of the file.
Running my_wf() hello world
🎉 Congratulations! You just ran your first Flyte workflow locally, let’s take it to the cloud!