Execute workloads with multiple files on Qubernetes
You can run workloads that consist of multiple files by specifying the main script file when executing the job. Qubernetes will automatically include all the necessary files in the project directory when running the workload on the cluster.
For example, if your project directory contains the following files:
- main.py
- __init__.py
- maths.py
- Q8Sproject
Now let’s say that main.py imports a function from utils/maths.py:
main.py
from utils.maths import add_numbersWhen you run the command to execute the main.py script on the Qubernetes cluster:
q8sctl execute --target gpu main.pyq8sctl will now package the entire project directory, including utils/maths.py, and make it available to main.py during execution on the cluster. No need to pack everything into a single file!