Netanel Malka
03/05/2024, 2:04 PMprefect.yaml
file? Iv'e found only a build section..Marvin
03/05/2024, 2:04 PMprefect.yaml
file. Instead, you can reference the image directly in your work pool configuration. By default, Prefect work pools that use containers reference the 2-latest
image, but you can specify a different image when creating the work pool. The specified image can also be overridden in individual deployment specifications.
For further details, check the following guides:
- Prefect Docker Guide
- Prefect Storage Guide
Please note, you will need to configure the work pool or deployment specification to use the existing Docker image accordingly. The documentation should provide specific instructions on how to set this up in your Prefect environment.Nate
03/05/2024, 2:48 PMimage
on your work pool, use set_working_directory
in your pull step
• flow code somewhere else? (e.g. github)
◦ still set your (base) image
in your work pool, use something like git_clone
in your pull stepNate
03/05/2024, 2:49 PMNetanel Malka
03/05/2024, 2:51 PMprefect work-pool create test_pool --provision-infra
and get:
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/httpx/_models.py", line 762, in json
return jsonlib.loads(self.content, **kwargs)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Nate
03/05/2024, 2:59 PMNetanel Malka
03/05/2024, 3:03 PMSet 'PREFECT_API_URL' to '<http://localhost:4200>'.
Updated profile 'default'.
netanel@netanel-ThinkPad-T14-Gen-2i ~/p/upstream-data-engineering (release-candidate)> prefect work-pool create -t process test --provision-infra
Traceback (most recent call last):
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
return fn(*args, **kwargs)
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 259, in coroutine_wrapper
return call()
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 431, in __call__
return self.result()
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 317, in result
return self.future.result(timeout=timeout)
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 178, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 388, in _run_async
result = await coro
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/cli/work_pool.py", line 122, in create
await client.read_work_pool(work_pool_name=name)
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/prefect/client/orchestration.py", line 2552, in read_work_pool
return pydantic.parse_obj_as(WorkPool, response.json())
File "/home/netanel/.cache/pypoetry/virtualenvs/upstream-data-engineering-ptQzHj37-py3.10/lib/python3.10/site-packages/httpx/_models.py", line 764, in json
return jsonlib.loads(self.content, **kwargs)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
An exception occurred.