You can quickly set up a Cortex project by running the following command:

cerebrium init <<project_name>>

This will create a Cortex project in the specified directory with the following structure:

project_name/
├── main.py
└── cerebrium.toml

Cortex supports the use of toml config files to configure various aspects of your project such as hardware requirements, scaling parameters and much more. Using config files makes it easier to keep track of your Cerebrium deployments, share them and use git versioning to show changes over time.

To deploy your model with a specific config file, you can use the cerebrium deploy command with the --config-file flag to specify the path to your config file. This can be any .toml file or a .yaml (deprecated) file. Otherwise cerebrium deploy will use the cerebrium.toml file in your directory. If you would like more information on how to use config files, please see the Using Config Files page.

If you are still on the legacy YAML config file format, you can convert your config file to a toml config file by answering yes to the prompt when you run cerebrium deploy as normal. This will create a cerebrium.toml file in your project directory which you can then edit as you wish. Additionally, all the dependencies in your pkglist.txt and conda_pkglist.txt files will be added to the cerebrium.toml file automatically

cerebrium deploy

Your config file can be named anything you want and can be placed anywhere on your local machine. However, remember to use the cerebrium deploy command in the same directory as your main.py as you would normally.