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

[operator] enable bashrc before container start #427

Merged

Conversation

Basasuya
Copy link
Contributor

@Basasuya Basasuya commented Jul 28, 2022

Why are these changes needed?

The ray cluster will not load the .bashrc before the container start. The reason is the ray process starting command is like this:

    Command:
      /bin/bash
      -c
      --
    Args:
      ulimit -n 65536; ray start --head  --system-config='{"gcs_rpc_server_reconnect_timeout_s": 20}'  --block  --num-cpus=4  --memory=8000000000  --dashboard-host=0.0.0.0  --node-ip-address=$MY_POD_IP  --port=6379  --metrics-export-port=8080

/bin/bash -c means non-Interactive mode to run bash.
reference to https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files
non-Interactive mode would not load /etc/profile, .bashrc, ...
we can use login mode to get similar effect with the interactive mode

Related issue number

#409

Checks

  • [*] I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • [*] Manual tests
    • This PR is not tested :(

@akanso
Copy link
Collaborator

akanso commented Jul 28, 2022

can you please elaborate more on what you mean by "iterative" in the title? your comment says "interactive"

   -i     If the -i option is present, the shell is interactive.
   -l     Make bash act as if it had been invoked as a login shell
          (see INVOCATION below).

https://www.man7.org/linux/man-pages/man1/bash.1.html

@Basasuya Basasuya changed the title [operator] enable interative bash before container start [operator] enable bashrc before container start Jul 29, 2022
@Basasuya
Copy link
Contributor Author

@akanso sorry for the unclear expression. I have updated the comment.
I want to use the login shell(-l) to enable interactive login shell, which would load .bashrc before process start

@Jeffwan
Copy link
Collaborator

Jeffwan commented Jul 30, 2022

@akanso does the commit message look good to you?

@akanso
Copy link
Collaborator

akanso commented Aug 1, 2022

looks good to me.

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.

None yet

3 participants