when you launch a job on a hpc cluster using a cluster job scheduler (PBS) it’s often the case that your environment won’t find its way into the spawned job environment.
many clusters use the module system for managing your environments, therefore one of the first things you might need to do in your job script is something like:
module load cuda
to pull in the environment settings needed for cuda compilation, for example.
The specifics of this are going to be unique to your cluster. This is probably a question for you to ask the cluster administrators or read existing documentation on how to launch jobs on your cluster.
Alternatively you may try just putting those export commands in your job script. But in any event, the job system probably is not running your .bashrc in the new process it creates to run your job.