Hello everyone, I noticed that Prefect downloads m...
# prefect-getting-started
k
Hello everyone, I noticed that Prefect downloads my code when running a flow. How can I prevent it from downloading my code? My code contains many data files, which result in large disk space occupation.
r
you can use docker and store the flow inside the container
k
My code and Prefect are deployed on the same machine, but when starting the Prefect server, I used the command: ‘prefect server start --host=0.0.0.0’
r
the host should not be 0.0.0.0, you’ll want that to be an actual URL that the API can be reached at from the UI user’s machine
k
thanks for your reply, but how can i know the “BLOCK_NAME” for the specific path?
r
you need to create the block then load it
k
When I was importing blocks, a new error occurred. Do I need to manually add this ‘.prefectignore’?
r
yes
k
My code is located at /app/wk/EGES. I first set up a Block and added /app/wk/EGES to the eges BLOCK. Then, when defining the flow, I loaded the eges BLOCK. However, when running the flow, the code is still being downloaded from /app/wk/EGES.
r
Can you remove that block
"If no storage is explicitly configured, Prefect will use
LocalFileSystem
storage by default. Local storage works fine for many local flow run scenarios, especially when testing and getting started. However, due to the inherent lack of portability, many use cases are better served by using remote storage such as S3 or Google Cloud Storage.
Prefect supports creating multiple storage configurations and switching between storage as needed."
You may just need to set the path args on the deployment
k
I looked up the documentation for build_from_flow at docs, but it didn’t mention the file path parameter. How can I learn about how to use this parameter?