How to create the environment of the collaboratory for notebooks?


#1

In order to test notebooks I want to be able to locally create the collaboratory environment with all the required packages in it, and to run the notebook locally in it.

But just 'pip install’ing the packages does not work, as e.g. ‘pip install bbp-client’ ends with an error

Collecting bbp-client
  Could not find a version that satisfies the requirement bbp-client (from versions: )
No matching distribution found for bbp-client

So is there a way to recreate the ncollaboratory notebook-environment in a local virtualenv, and to start a notebook from within?

Thanks
Alex


#2

Hello,

You could see the installed libraries in the notebook environment using the pip freeze command. I suspect the reason for the pip install not working is because not all packages are available in the public Python Packaging Index, some are hosted on the internal BBP network on a DEVPI instance. You need to provide the --index option with the right url to PIP so it can find those packages.

For the moment there is no out-of-box solution for replicating the Collaboratory’s notebook environment. We consider eventually publicly releasing the docker image used by our JupyterHub installation, but we have not time frame for that yet.

Best regards,
Akos


#3

Hi,

so what is the right URL to download the BBP internal libraries? Is it always the same URL for any package?

Thanks
Alex


#4

Hello,

pip install --index-url=https://bbpteam.epfl.ch/repository/devpi/simple/ 

I think you can install all the packages using this setting. AFAIK BBP configured DEVPI to forward requests to PYPI for packages that are not found on the local DEVPI instance.

Best regards,
Akos