AccelerationConsortium / ac-training-lab

Codebase for controlling and managing the Acceleration Consortium (AC) Training Lab.
https://ac-training-lab.readthedocs.io/
MIT License
8 stars 2 forks source link

Prefect flow based on GitHub file for OT2 #79

Open sgbaird opened 2 weeks ago

sgbaird commented 2 weeks ago

The prefect flow can be linked to a specific file within a repository, which allows for a sort of "over the air" (OTA) update to the device code.

sgbaird commented 2 weeks ago

@yunhzou

yunhzou commented 2 weeks ago

Yes! This will allow dynamic code management which is quite nice. `python
from prefect import serve,flow
source = "https://github.com/yunhzou/Prefect_demo.git"
entrypoint = "prefect_demo.py:add_numbers"
serve(flow.from_source(source=source, entrypoint=entrypoint))

or workpool

 flow.from_source(source=source, entrypoint=entrypoint).deploy(name="add_numbers",   
                                                              work_pool_name="Jackie Computer")`  

Difference between workpool and serve method: Workpool allow dynamic deploy different functions on workpool terminals Serve predefine what are the functions need to be run on the machine, and can not be change later

sgbaird commented 6 days ago

@yunhzou what are your thoughts/plans for tomorrow for the OT-2 color matching demo? #26

sgbaird commented 5 days ago

Sounds like you've been having trouble with installing Prefect on the Raspberry Pi (a 3 I think) embedded in the Opentrons, which it sounds like is running Linux.

Do you mind including the steps/commands you ran and the full command line output for the pip install?

Related:

When you share the full command output I should be able to help debug. We can jump on a screen share / remote access if needed since it's more urgent.

yunhzou commented 5 days ago

Works now. Video: https://youtu.be/4Eu4eYGAP9w Code: https://github.com/yunhzou/OT2Demo/issues/1