1

I am trying to set up a jupyter notebook server so that a few members can have access and run analysis on it. But there are several API credentials that I stored as the environment variables that I don't want users to have access to. Basically I want to prevent users from importing os module in the notebook, since os.environ list all environment variables on the server. What would be a proper way to do this?

Psidom
  • 209,562
  • 33
  • 339
  • 356

1 Answers1

1

You could try to run the jupyter notebook server as a Docker container. That way your environment variables will be isolated from the container. Ipython has an available docker image, so you need to install docker if this approach works for you.

Installing Ipython Docker Image

If you need to pass environment variables for the Docker container refer to this question: Passing env variables to docker

Milton Arango G
  • 775
  • 9
  • 16
  • That's a good point. I was actually trying on it but when pull the image, and run `docker run -d -p 443:8888 -e "PASSWORD=MakeAPassword" ipython/scipyserver`. The endpoint `https://localhost:8888` gives me error says `SSLError: ...(something here) :wrong version number`. Do you have any idea what might be the issue? – Psidom Feb 15 '18 at 19:38