When using cnvrg to run experiments or to start a notebook, cnvrg fires up a machine with many different libraries and setting that come pre-installed for the use of data science.
Though, there are some cases when a user would like to use a different version of a library or a library that isn't already installed on a machine.
cnvrg understand those needs and lets you customize libraries in a simple and convenient way.
Installing custom libraries
Before running a new experiment or starting a notebook:
- Create a file name 'requirements.txt' and locate it in the project head tree (in the main projects directory)
- specify which python libraries you would like to install
- If you want to use the web interface for running experiments or starting notebooks:
- make sure to sync the file before starting an experiment or a notebook with cnvrg sync
- If you use cnvrg CLI tool for running experiments or starting notebooks, the file will be synced automatically
When running the experiment or starting a notebook, cnvrg will first locate the requirements.txt file, will identify which environment to run it against (Python 2 or Python 3) and only then will start the experiment or notebook session.
An example of an experiment with requiremnets.txt file:
An example of project tree with requiremnets.txt: