I'm currently trying to run my makefile which is as follows:
run program:
export CUDA_VISIBLE_DEVICES=1
python ~/program/main.py --setup2
I receive a Permission denied
error when I try to run the export
shell command. I'm assuming the reason is because I'm currently using a lab's server to run this program, and usually only a designated few are granted permission for many of the server's functionalities.
However, whenever I run this command "manually" (i.e. typing out both lines of the makefile myself in the terminal), it runs fine.
I've also taken a look at How to use shell commands in Makefile and shell script run when I am root but I get a permission denied when it is invoked from a Makefile (still as root) and tried to change the line export CUDA_VISIBLE_DEVICES=1
to "$(export CUDA_VISIBLE_DEVICES=1)"
and "$(shell export CUDA_VISIBLE_DEVICES=1)"
but I get the same permission error.
Is there a way that I can go around this issue, or will I have to talk to the server manager? Thanks.