0

This post gives a way to check CUDNN version.

CUDNN_H_PATH=/usr/include/cudnn.h
cat ${CUDNN_H_PATH} | grep CUDNN_MAJOR -A 2

I am trying to use this approach on colab

Actually, I've got the CUDNN version of colab.

cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2

And then I am trying to find out if it is possible set Ubuntu Environment Variable from jupyter notebook cell.

From terminal, following command is working well

$ export abc=1
$ echo $abc 
1

run this inside a jupyter notebook (https://colab.research.google.com) cell gets nothing

enter image description here

echo an Ubuntu Environment Variable is working well

enter image description here

So, is it possible set Ubuntu Environment Variable from jupyter notebook cell?

  • can you give more context on what you're trying to achieve? Environment variables are set in subshells so there are ways to do it for child processes but otherwise it is not possible – Marat Aug 18 '19 at 23:09
  • @Marat I've updated the OP. Please check if I expressed clearly I am trying to do. –  Aug 18 '19 at 23:29

1 Answers1

1

Have you considered using the %env magic command?

%env abc=1

Should accomplish what you want to do.

Tomas Farias
  • 1,293
  • 1
  • 14
  • 18