Custom environment variables not exported in true SSH
After creating a pod and specifying some environment variables. I can see how these variables are accessible from the Basic SSH and the JupyterLab Terminal. However, when doing "True SSH" these environment variables are nowhere to be seen
To reproduce
Environment variable specified in the Pod configuration:
Running echo $HF_TOKEN from the JupyterLab terminal or the Basic SSH will output the value.
Running echo $HF_TOKEN from the "True SSH" terminal will return an empty value
+1 - getting same issue
Any news ?
I'm also having this issue, no sign of my envs when using vscode remote which requires "true ssh" :(
Hi, I ran into the same issue.
Temporary workaround: adding the RUNPOD_ prefix (e.g. RUNPOD_HF_TOKEN).
Vars without the prefix don’t show up, but the prefixed one is available in True SSH.
Tested in a custom template based on runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04; I haven’t verified it on other images yet.
Hope this helps!
It seems that there was a fix mentioned above merged two months ago. However, I am still encountering the problem.
Hi, I ran into the same issue. Temporary workaround: adding the
RUNPOD_prefix (e.g.RUNPOD_HF_TOKEN). Vars without the prefix don’t show up, but the prefixed one is available in True SSH. Tested in a custom template based on runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04; I haven’t verified it on other images yet. Hope this helps!
@sbite0138 Thanks for your suggestion. Your proposed workaround does not work for my custom template via True SSH. The environment variables are visible via "Fake" SSH though.
Just in case this helps anyone: I run source /etc/rp_environment before using any commands that might need environment variables, which seems to do the trick in my "true SSH" connections. Not sure why these are not sourced automatically.
For reference, I'm using the runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404 image.
You shouldn't have to do that at all, which is just a little confusing. Are you still seeing problems with this, if so, can you please specific exactly what image or template id your pods were deployed with?