An installation script is available for quick and hassle-free installations, streamlining the setup process for new users.

Can be used with the following command:

  curl https://localai.io/install.sh | sh
  

Installation can be configured with Environment variables, for example:

  curl https://localai.io/install.sh | VAR=value sh
  

List of the Environment Variables:

Environment VariableDescription
DOCKER_INSTALLSet to “true” to enable the installation of Docker images.
USE_AIOSet to “true” to use the all-in-one LocalAI Docker image.
API_KEYSpecify an API key for accessing LocalAI, if required.
CORE_IMAGESSet to “true” to download core LocalAI images.
PORTSpecifies the port on which LocalAI will run (default is 8080).
THREADSNumber of processor threads the application should use. Defaults to the number of logical cores minus one.
VERSIONSpecifies the version of LocalAI to install. Defaults to the latest available version.
MODELS_PATHDirectory path where LocalAI models are stored (default is /usr/share/local-ai/models).
P2P_TOKENToken to use for the federation or for starting workers see documentation
WORKERSet to “true” to make the instance a worker (p2p token is required see documentation)
FEDERATEDSet to “true” to share the instance with the federation (p2p token is required see documentation)
FEDERATED_SERVERSet to “true” to run the instance as a federation server which forwards requests to the federation (p2p token is required see documentation)

We are looking into improving the installer, and as this is a first iteration any feedback is welcome! Open up an issue if something doesn’t work for you!

Last updated 12 Jul 2024, 08:42 +0200 . history