You may invoke such non Python process either as a subprocess, starting a Docker container or running a namespaced pod job on Kubernetes - for 1.0, check out the task library with Docker and Kubernetes tasks for that, there is also ShellTask for subprocess call
For 2.0 there is currently only subprocess task installable with: pip install prefect_shell