By default, Cerebrium models are executed in Python 3.9 unless the Python version specified by you in your config.yaml is different. However, Cerebrium only supports version 3.9 and above.

Traditionally, when working with Python, you will need access to Apt packages, Pip packages and Conda packages, and so we replicate this functionality as if you were developing locally. When creating your Cortex project, you can contain the following files

  • requirements.txt - This is where you define your Pip packages.
  • pkglist.txt - This is where you can define Linux packages you would like to install. We run the apt-install command for items here.
  • conda_pkglist.txt - This is where you can define Conda packages you would like to install if you prefer using it for some libraries over pip. You can use both conda and pip in conjunction.

Each package must be represented on a new line just as you would locally. All the files above are optional, however, have to contain these file names specifically.

Typically, specifying versions for packages leads to faster builds however, if you ever find you would like to change version numbers or find your library versions aren’t updating, please add the following flag to your deploy command: cerebrium deploy model-name --force-rebuild