Replies: 1 comment 2 replies
-
|
Hey @wigging! When you run a script with
Each time the server tells the process to start a run, the process on machine A runs your code. Prefect offers the ability to store your code remotely and pull it onto a machine before executing, However, your code is already available on machine A, so the All in all, your flow code is never sent to the server and runs in the same environment it's served in, so Let me know if you have any other questions while trying out Prefect! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Below is a Python script that imports the NumPy package to multiply two arrays. This script is part of a uv project which uses a pyproject.toml file to define the dependencies. This code is on Computer A and the Prefect server is running on Computer B which is on the same network.
On Computer A, I run this code with:
and here is some of the terminal output on Computer A after running the script:
Everything seems to be working fine but since Computer B does not have the NumPy package then how is it executing the code? I read the How to run flows in local processes example and it makes it sound like the flow is run on the server. And in the output I shared above, it displays
Downloading flow code from storage at '.'which makes me think the code is download to the server. So is the virtual environment on Computer A being downloaded to the Prefect server on Computer B?Beta Was this translation helpful? Give feedback.
All reactions