does flyin plugin need to be enabled somehow - i a...
# ask-the-community
a
does flyin plugin need to be enabled somehow - i am having issues following the guide on https://docs.flyte.org/en/latest/flytesnacks/examples/flyin_plugin/vscode.html all examples do not seem to be showing any pointers to custom image files yet default pyflyte execution triggers ModuleNotFoundError: No module named 'flytekitplugins.flyin'
Use port forwarding. To use port forwarding, execute the following command:
Copy code
$ kubectl port-forward <pod name> <port>
Then, open a browser and navigate to
localhost:<port>
, replacing
<port>
with the port number configured above.
but thre is no reference to port number above
d
Hi Alex I'm starting to reproduce your issue. I installed the plugin
pip install flytekitplugins-flyin
and then upgraded flytekit to latest (1.10.2) Nevertheless, after completing those steps and running on a remote cluster, it still fails with
ModuleNotFoundError: No module named 'flytekitplugins.flyin'
cc @Yi Chiu / @Byron Hsu
l
kubectl port-forward -n flytesnacks-development $1 8080:8080;
you have to replace
$1
to the pod name
a
of flyte-binary?
l
image.png
you will have pod like this when running flyte task
a
ah - sorry - i have 2 threads going
yeah - i figured it out
l
@David Espejo (he/him) you shoulde use
pip install flytekitplugins-flyin --pre
a
but the way i got it working is i build the Dockerfile from git
l
since we have only release the betaversion of flytekit
a
and just ran the task in that image
l
so it works, right?
a
when i did it that way yes
l
which image? flyin-image?
by the dockerfile provide in the flyinplugin folder
a
that one
l
which one?
a
built it and used as an image for the task
l
ok, happy for it
a
@vscode decoration does nothing
if i follow documentation
it just startes the task in default image and complains that plugin is not found
do i have to enable the plugin somehow so that it works?
l
no
because you have to specify the image with flyin plugin (python package_ installed
for example, you have to build a image called flyin-image
pyflyte run --image flyin-image --remote workflow.py wf
you have to do something like this
a
what is the point of @vscode decorators? inst that image just starts code-server and i can juist specify it for any task
l
and when you install the flytekit package, please use
pip install flytekit --pre
I think you didn;t install the beta version
a
i dindt
when i run it now - it just does noting
l
you have to use portforward
port forward
Ok, can you clarify your steps? 1. run it in sandbox mode or single binary mode? 2. provide the code and the command line you use 3. provide your testing environment
a
my question - why do i need the plugin at all - what does it do? if i just build a custom container for the task that starts code-server and have to port-forward myslef whats the additional functionality of the plugin or @vscode decorators?
single binary mode
you can refer this doc to get more information
a
when i get into it with my task
image.png
workflows.vscode is how i passed it to pyflyte
but inside the /tmp/flyte-6l4wwjw_/sandbox/local_flytekit it is just vscode.py
l
<http://localhost:8080/?folder=/root>
try go here
a
i can but .vscode cfgs are in /root/workflows
image.png
debug works if i change task_module_name="workflows.vscode", to task_module_name="vscode",
l
so you are thinking this is a bug, right?
a
looks like it
l
ok, cc @Yi Chiu can you take a look at it? It seems that this flyin doesn't support recursive case
a
also copilot does not seem to install
evan as i added
config = VscodeConfig() config.add_extensions(COPILOT_EXTENSION) # Use predefined URL @task(requests=Resources(cpu="1", mem="1000Mi"), container_image="099604434934.dkr.ecr.us-east-2.amazonaws.com/flyte:flyin2") @vscode(config=config, max_idle_seconds=60000)
l
that's a bug, will fix it today. https://github.com/flyteorg/flytekit/pull/1991
if you want to use copilot
you have to add it into your dockerfile now.
a
do you have an example?
like this?
and install
GitHub.copilot
at the end of the dockerfile
Copy code
code-server --install-extension /tmp/code-server/GitHub.copilot-1.138.563.vsix"
a
it worked
l
thank you
if possible, please reply other thread
y
Hi @Alex Lyashok , could you give me the command that you run the workflow?