kasteph
03/07/2023, 10:31 PMFileNotFoundError: [Errno 2] No such file or directory: '/etl/deployments'
I have a Local Storage block defined:
block_storage = LocalFileSystem(basepath=str(Path().parent.resolve()))
block_storage.save("local-storage", overwrite=True)
And that itself is being used by the deployment:
if __name__ == "__main__":
deployment = Deployment.build_from_flow(
flow=trigger_that_job,
name="trigger_that_job",
work_queue_name="work",
storage=LocalFileSystem.load("local-storage")
)
deployment.apply()
Doing docker exec compose server sh
and looking around, the directory and path are there.
This is the folder structure:
.
├── blocks/
├── deployments/
├── docker-compose.yml
Christopher Boyd
03/08/2023, 1:18 AMpath
and entrypoint
for docker - they should be inferred, but I’ve seen a few issues with this.
path
is the directory path from root up to the module (so like /etl/deployments
entrypoint
is the module + flow definition (so like flow.py:main
)
https://docs.prefect.io/api-ref/prefect/deployments/#prefect.deployments.Deploymentkasteph
03/08/2023, 1:22 AMpath
but then it would copy my whole project directory onto that. I did notice something which is that the error is coming from my host machine Python instead of the docker python:
File "/home/steph/.pyenv/versions/3.9.9/lib/python3.9/shutil.py", line 564, in copytree
with os.scandir(src) as itr:
FileNotFoundError: [Errno 2] No such file or directory: '/etl'