Skip to main content

Environment Variables

Bitfount exposes a number of configuration options through environment variables which you can set. Most users don't need to be aware of these but they are available to use if you would like to customise your experience. Ensure you set these in your environment prior to running or importing bitfount.

Setting environment variables

Unix

For example, if running bitfount from the CLI, you can set the environment variable in the same command:

BITFOUNT_USE_MPS=True bitfount run_pod --path_to_config_yaml=<CONFIG_FILE>

Or you can set it at any point prior to the running the bitfount command or launching the environment from which you will import bitfount (e.g. jupyter notebook):

export BITFOUNT_USE_MPS=True
# Any number of other commands in between
jupyter notebook

Windows

In windows, setting the environment variable in-line is more difficult so it is recommended you set it beforehand, as in the second example given above. Instead of using export, we need to use set.

set BITFOUNT_USE_MPS=True
jupyter notebook

Alternatively, windows allows you to set environment variables globally in the control panel settings.

Bitfount environment variables

Environment VariableTypeDefaultDescription
BITFOUNT_API_KEY_IDstringNoneBitfount API Key ID to be used for logging in to a specific Pod. This is generated on Bitfount AM. More information.
BITFOUNT_API_KEYstringNoneBitfount API Key to be used for logging in to a specific Pod. This is generated on Bitfount AM. More information.
BITFOUNT_ENGINEstringpytorchDetermines the backend used. Current accepted values are basic or pytorch. Currently installing pytorch is compulsory, but in the future, more options will be supported here allowing the user to choose which backend they want to use and install.
BITFOUNT_ENVIRONMENTstringproductionAccepted values are production, staging or dev. This should only be used for development purposes by Bitfount employees.
BITFOUNT_HOMEstring~Path to a directory where a .bitfount subdirectory will be created for local storage purposes and configuration. Defaults to the user's home directory. Setting this environment variable to a different directory can effectively mimic a fresh installation which can be useful for development and troubleshooting purposes.
BITFOUNT_LOG_TO_FILEboolTrueDetermines whether bitfount logs to file as well as to console. Setting this to False can potentially save you a lot of disk space!
BITFOUNT_LOGS_DIRstring./bitfount_logsDetermines where log files are stored. If empty, logs will be stored in a subdirectory called bitfount_logs in the directory where the script is run from.
BITFOUNT_ONLINE_CHECK_SOFT_LIMITint180The number of seconds of inactivity in a task before the Pod will check to see if the task initiator is still online.
BITFOUNT_ONLINE_CHECK_HARD_LIMITint180The number of seconds of inactivity in a task after the soft limit before the Pod will abort the task.
BITFOUNT_POD_VITALS_PORTint29209Determines the TCP port number to serve the Pod vitals health check over. You can check the state of a running pod's health by accessing http://localhost:{{ BITFOUNT_POD_VITALS_PORT }}/health.
BITFOUNT_PROXY_SUPPORTboolFalseAdds automatic support for using Bitfount behind a proxy (even an HTTPS proxy) and ensures all parts of the system will communicate by the proxy. Additionally ensures that any custom root CAs installed on the system are loaded. Enables passthrough support for common proxy environment variables (HTTP_PROXY, HTTPS_PROXY, etc.).
BITFOUNT_TASK_BATCH_SIZEint100This is used by the pod to determine how many batches to split a task into if the modeller has requested batched execution.
BITFOUNT_TB_LIMITint3Traceback limit for exceptions. By default, only the final 3 exceptions are shown.
BITFOUNT_USE_MPSboolFalseWhether to use MPS acceleration on Apple M1/M2 silicon chips if available.

Arbitrary environment variables

In addition to the Bitfount-specific environment variables listed above, you can also utilise your own custom environment variables in Pod YAML config files by enclosing them in curly brackets. See here for an example.