Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically spawn python child process from provider C++ code #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jordanmao
Copy link
Member

Modified provider C++ code to use the autogenerated ZMQ sender/receiver ports to spin up the python child process using boost. Every time the provider starts working on a task request, a python child process is created and terminated.

Copy link
Member

@rayaq-siddiqui rayaq-siddiqui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code looks perfect. I think we should wait until after the current demo to merge this and make the alterations to this code to work for the ML side. I think those will be minor, but just the python dependencies is the only concern.

std::vector<std::string> args{
std::to_string(zmq_sender.getPort()),
std::to_string(zmq_receiver.getPort())};
boost::process::child python_script("/usr/bin/env", "python3", script_path, args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this dependent on where a user would have their local python installation? for me, when i run where python3, i see that my python installation is in /usr/bin/python3. that won't work with this setup then, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants