Init Cortex Project
You can quickly set up a Cortex project by running the following command:
cerebrium init-cortex-project <<your_initialisation_directory>>
This will create a Cortex project in the specified directory with the following structure:
your_project/
├── main.py
├── requirements.txt
├── pkglist.txt
├── conda_pkglist.txt
└── config.yaml
Configuring your Cortex Project
The initial files are initialised with some default values, and you can add to your requirements.txt, pkglist.txt and conda_pkglist.txt as you would normally.
Alternatively, you can use the --requirements-list
, --pkg-list
and --conda-pkglist
commands to customise the contents of these files.
For example, you can add a few packages to your requirements.txt as follows:
--requirements-list "['transformers', 'datasets', 'sentencepiece==0.1.97']"
The config.yaml
file contains the parameters for your deployment.
It is initialised with the following default values:
%YAML 1.2
---
hardware: GPU
include: "[./*, main.py, requirements.txt, pkglist.txt, conda_pkglist.txt]"
exclude: "[./.*, ./__*]"
log_level: INFO
disable_animation: false
However, you can change each of these values by using their respective flags as you would with a normal cortex deployment. For example, to change the hardware to CPU, you can run: See the documentation here for more info on config files.