Harish
Harish
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Ok should be all good then, thank you both for your help 🙂 really appreciate it
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Think I just had to restart the terminal
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Wait nvm scratch that, it does work on root now
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
conda. Am assuming that it's because I'm not exporting PATH though, will figure out how to inject PATH in the same command without overwriting the existing path
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
The question I was asking was more along the lines of is it okay to inject environment variables with this command in the start script
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
awk or sed doesn't matter, it is finding and inserting the env variables in correctly
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Thank you for your help
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
No no, that part is working! 🙂
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Also unrelated - the python env doesn't load when I ssh in with root@<ip>, but it does when I ssh in with <user>@runpod
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
But yeah adding the others is basically what I'm doing, just want to make sure that's right and secure
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
sed is what claude gave me lol, also don't have to do the escape characters thing
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
I'm assuming that security is fine though since in essence this is the same thing, just actually finding the right env variables to copy
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
How would it work though? The injected environment variables don't actually start with either RUNPOD_ or PATH or just _
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Unfortunately this still didn't work. I had to actually explicitly grep for the variables I wanted to keep - this makes sense to me too, as the grep for RUNPOD_ and PATH= didn't have the variables I wanted anyways. Could you confirm this is still a secure way of injecting the variables? @digigoblin @Papa Madiator Here is what I did: echo "Exporting Env Variables..."; env | grep -E "^(HF|RUNPOD|AWS|WANDB)" | sed "s/^(.)$/export \1/">> /etc/rpenvironment; echo "Finished exporting env variables. Variables from parent:"; env | grep -E "^(HF|RUNPOD|AWS|WANDB)" Tried multiple versions of RUNPOD and PATH= to no avail. Here's the full command now: bash -c 'apt update;DEBIANFRONTEND=noninteractive apt-get install openssh-server -y;mkdir -p ~/.ssh;cd $;chmod 700 ~/.ssh;echo "$PUBLIC_KEY" >> authorized_keys;chmod 700 authorized_keys; pip install OhMyRunPod; OhMyRunPod --setup-ssh; echo "Exporting Env Variables..."; env | grep -E "^(HF|RUNPOD|AWS|WANDB)" | sed "s/^(.)$/export \1/">> /etc/rp_environment; echo "Finished exporting env variables. Variables from parent:"; env | grep -E "^(HF|RUNPOD|AWS|WANDB)"; echo "source /etc/rp_environment" >> ~/.bashrc; service ssh start;sleep infinity'
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Okay removing the PATH_ grep worked - but it's not copying over the right env variables now 😢
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Going to remove the grep for PATH_ and see if that fixes it
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
Is this the right script to run?
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
@Papa Madiator @digigoblin
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
And then no commands other than cd work
88 replies
RRunPod
Created by Harish on 6/10/2024 in #⛅|pods
remote-ssh broken
bash: uname: No such file or directory bash: sed: No such file or directory
88 replies