https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Alex Lyashok

01/11/2024, 6:13 PM
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

David Espejo (he/him)

01/11/2024, 7:43 PM
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

L godlike

01/11/2024, 11:38 PM
kubectl port-forward -n flytesnacks-development $1 8080:8080;
you have to replace
$1
to the pod name
a

Alex Lyashok

01/11/2024, 11:40 PM
of flyte-binary?
l

L godlike

01/11/2024, 11:40 PM
image.png
you will have pod like this when running flyte task
a

Alex Lyashok

01/11/2024, 11:41 PM
ah - sorry - i have 2 threads going
yeah - i figured it out
l

L godlike

01/11/2024, 11:41 PM
@David Espejo (he/him) you shoulde use
pip install flytekitplugins-flyin --pre
a

Alex Lyashok

01/11/2024, 11:42 PM
but the way i got it working is i build the Dockerfile from git
l

L godlike

01/11/2024, 11:42 PM
since we have only release the betaversion of flytekit
a

Alex Lyashok

01/11/2024, 11:42 PM
and just ran the task in that image
l

L godlike

01/11/2024, 11:42 PM
so it works, right?
a

Alex Lyashok

01/11/2024, 11:42 PM
when i did it that way yes
l

L godlike

01/11/2024, 11:42 PM
which image? flyin-image?
by the dockerfile provide in the flyinplugin folder
a

Alex Lyashok

01/11/2024, 11:43 PM
that one
l

L godlike

01/11/2024, 11:43 PM
which one?
a

Alex Lyashok

01/11/2024, 11:44 PM
built it and used as an image for the task
l

L godlike

01/11/2024, 11:44 PM
ok, happy for it
a

Alex Lyashok

01/11/2024, 11:44 PM
@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

L godlike

01/11/2024, 11:46 PM
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

Alex Lyashok

01/11/2024, 11:47 PM
what is the point of @vscode decorators? inst that image just starts code-server and i can juist specify it for any task
l

L godlike

01/11/2024, 11:48 PM
and when you install the flytekit package, please use
pip install flytekit --pre
I think you didn;t install the beta version
a

Alex Lyashok

01/11/2024, 11:49 PM
i dindt
when i run it now - it just does noting
l

L godlike

01/11/2024, 11:49 PM
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

Alex Lyashok

01/11/2024, 11:50 PM
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

Alex Lyashok

01/12/2024, 12:03 AM
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

L godlike

01/12/2024, 12:05 AM
<http://localhost:8080/?folder=/root>
try go here
a

Alex Lyashok

01/12/2024, 12:07 AM
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

L godlike

01/12/2024, 12:08 AM
so you are thinking this is a bug, right?
a

Alex Lyashok

01/12/2024, 12:08 AM
looks like it
l

L godlike

01/12/2024, 12:09 AM
ok, cc @Yi Chiu can you take a look at it? It seems that this flyin doesn't support recursive case
a

Alex Lyashok

01/12/2024, 12:09 AM
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

L godlike

01/12/2024, 12:10 AM
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

Alex Lyashok

01/12/2024, 12:10 AM
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

Alex Lyashok

01/12/2024, 12:48 AM
it worked
l

L godlike

01/12/2024, 12:48 AM
thank you
if possible, please reply other thread
y

Yi Chiu

01/12/2024, 5:50 AM
Hi @Alex Lyashok , could you give me the command that you run the workflow?