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.

There are some cases when a user would like to use a different version of a library or a library that isn't installed on the machine.

To support that, cnvrg offers an easy solution as it searches for a requirements.txt file and automatically installs its content prior the run of the experiment/notebook.

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 requirements.txt file


To generate this kind of format to your own project, type 

$ pip freeze > requirements.txt

An example of project tree with requirements.txt:

$ ls







Did this answer your question?