Nimesh Kumar
03/07/2025, 11:21 AMprefect deployment build -sb "s3/inferencing-bucket" -n "algo.57" -q "algo-57" "algo-57.py:start_inferencing_57"
for prefect 3.2 i read in the documentation that we had run prefect init
which will generate yaml file and then we need to run prefect deploy
. but when i run prefect init in CLI it ask for gcs bucket name and when i write the bucket name it throws a below error.
root@a3124f089d1f:/opt/prefect# prefect init
? Would you like to initialize your deployment configuration with a recipe? [Use arrows to move; enter to select; n to select none]
┏━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ ┃ Name ┃ Description ┃
┡━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ │ azure │ Store code within an Azure Blob Storage container │
│ │ docker-azure │ Store code within an Azure Blob Storage container and build a custom docker image for runtime │
│ │ docker-git │ Store code within a git repository and build a custom docker image for runtime │
│ > │ gcs │ Store code within a GCS bucket │
│ │ docker │ Store code within a custom docker image alongside its runtime environment │
│ │ docker-s3 │ Store code within S3 and build a custom docker image for runtime │
│ │ docker-gcs │ Store code within GCS and build a custom docker image for runtime │
│ │ s3 │ Store code within an S3 bucket │
│ │ git │ Store code within git repository │
│ │ local │ Store code on a local filesystem │
│ │ │ No, I'll use the default deployment configuration. │
└────┴──────────────┴───────────────────────────────────────────────────────────────────────────────────────────────┘
Required inputs for 'gcs' recipe
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Field Name ┃ Description ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ bucket │ The bucket to store and retrieve this code from │
└────────────┴─────────────────────────────────────────────────┘
bucket: prefect-flows-platform
---------------
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 44, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_types.py", line 155, in sync_fn
return asyncio.run(async_fn(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/deploy.py", line 218, in init
for fname in initialize_project(name=name, recipe=recipe, inputs=inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/deployments/base.py", line 202, in initialize_project
if create_default_prefect_yaml(".", name=project_name, contents=configuration):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/deployments/base.py", line 45, in create_default_prefect_yaml
with default_file.open(mode="r") as df:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 1044, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/prefect/deployments/templates/prefect.yaml'
Bianca Hoch
03/07/2025, 3:36 PMBianca Hoch
03/07/2025, 3:37 PMprefect init --recipe gcs
within a new directory?Nimesh Kumar
03/07/2025, 6:28 PMprefect init --recipe gcs
Required inputs for 'gcs' recipe
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Field Name ┃ Description ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ bucket │ The bucket to store and retrieve this code from │
└────────────┴─────────────────────────────────────────────────┘
bucket: prefect-flows-platform
---------------
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 44, in wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/_types.py", line 155, in sync_fn
return asyncio.run(async_fn(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/cli/deploy.py", line 218, in init
for fname in initialize_project(name=name, recipe=recipe, inputs=inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/deployments/base.py", line 202, in initialize_project
if create_default_prefect_yaml(".", name=project_name, contents=configuration):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/prefect/deployments/base.py", line 45, in create_default_prefect_yaml
with default_file.open(mode="r") as df:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 1044, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/prefect/deployments/templates/prefect.yaml'
An exception occurred.
root@a3124f089d1f:/opt/prefect#
Nimesh Kumar
03/07/2025, 6:45 PM