This message was deleted.
# ask-ai
e
This message was deleted.
j
Your question appears to be cut off, but based on the context, you are running into issues with Flyte task execution in a Bazel monorepo, using a Docker image with
/app
as
WORKDIR
, and registering/running workflows via Flyte in a Kubernetes environment. The command you posted is the standard Flyte task execution entrypoint, but you may be experiencing import/module resolution errors or issues with code/package discovery. Key points to check: - When using fast registration (
pyflyte register
), Flyte injects your code archive into the container at runtime and extracts it at the
WORKDIR
(here,
/app
). Your Python modules must be discoverable from this directory, and your
PYTHONPATH
should include
/app
or the relevant subdirectory. If your code is in a subfolder (e.g.,
monorepo/path/to/hello_world.py
), ensure that the import path matches the directory structure and that all parent directories have
__init__.py
files to form a valid Python package. - If you see
ModuleNotFoundError
or similar, it is often due to a mismatch between the code location in the container and the expected import path. You may need to adjust your Dockerfile's
WORKDIR
, the
source_root
in your
ImageSpec
, or use the
--destination-dir
flag during registration to align the code extraction path with your import structure. See the fast registration documentation and WORKDIR/PYTHONPATH notes. Would you like a step-by-step breakdown or help with a specific error message? Sources: - WORKDIR, PYTHONPATH, and fast registration - fast registration documentation 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.