I have set environment variables in the .bashrc:
export nnUNet_preprocessed="/data/nnUnet/preprocessed"
These are found successfully in terminal after sourcing and/or logging out. If I run pycharm out of the same terminal, it is able to find them via
nnUNet_preprocessed = os.environ.get('nnUNet_preprocessed')
However, if I launch Pycharm via Actions (Ubuntu 16.04), it yields none. Any suggestions?
The ~/.bashrc init script is only run by interactive Bash shells. When you launch PyCharm using your window manager there isn't any Bash shell, let alone an interactive one, involved in lauching PyCharm. You can set the env var globally (e.g., in /etc/environment) but why not just start PyCharm from an interactive Bash session if it requires custom env vars you want to manage in your ~/.bashrc init script? Alternatively, create a wrapper script that looks something like the following and run it via "Actions" (whatever that is):
#!/usr/bin/bash -i
exec Pycharm