Hi. I'm still struggling to launch my workflow from a container inside of Sandbox environment. My workflow requires
verstack
so I included it to requirements.txt. Here is the outline what I did:
$ pyflyte init my_first_wf
$ ./bin/flytectl sandbox start --source .
Then I wrote some codes under workflows directory. I tested locally using python command and it worked without any problem, cuz verstack is inside venv library.
Now I built an image using bundled docker_build.sh like this:
$ sh docker_build.sh -r localhost:30000
$ pyflyte --pkgs <http://workflows.my|workflows.my>_workflow package --image localhost:30000/my_first_wf:fbc629e54b46c12d6396d39ea9d3f37307ba961d
At this moment, when I launch a container at localhost
3000/my first wffbc629e54b46c12d6396d39ea9d3f37307ba961d, the python environment recognizes verstack.
$ docker run -it localhost:30000/my_first_wf:fbc629e54b46c12d6396d39ea9d3f37307ba961d sh
# python
>>> import verstack
(no problem)
However, when I try to run my workflow inside the demo cluster, it fails because python couldn't find verstack library.
pyflyte run --remote workflows/my_workflow.py train --filename '$VVIX.csv' --test_size 0.25 --output_path model.model
The import statement fails because it couldn't find verstack, and attached is a part of the log.
Pod failed. No message received from kubernetes.
[fd4d75a833c134b5f9e1-n0-0] terminated with exit code (1). Reason [Error]. Message:
l>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/root/workflows/my_workflow.py", line 11, in <module>
from verstack import LGBMTuner
ModuleNotFoundError: No module named 'verstack'
Am I successfully launching a pod that I made, or am I launching a different version of pod?