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

Expose the private IP address in a system environment variable #2219

Open
jvstme opened this issue Jan 23, 2025 · 0 comments
Open

Expose the private IP address in a system environment variable #2219

jvstme opened this issue Jan 23, 2025 · 0 comments
Labels
enhancement A non-feature improvement

Comments

@jvstme
Copy link
Collaborator

jvstme commented Jan 23, 2025

Problem

A node in a distributed task may need to know its own private IP address, e.g. to bind a socket to it or for logging purposes.

Currently, there isn't an easy way for a node to find out its private IP address.

Solution

Provide a new system environment variable containing the private IP of the current node, e.g. DSTACK_NODE_IP.

Workaround

dstack already provides the DSTACK_NODES_IPS variable with a list of all nodes' IP addresses, so the node can try comparing the value of this variable with the output of ifconfig or ip.

Would you like to help us implement this feature by sending a PR?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A non-feature improvement
Projects
None yet
Development

No branches or pull requests

1 participant