Before installing Sage, ensure you have the following:
- Docker installed on your system
- An environment file or the necessary environment variables set up
-
Create the container directory:
mkdir -p codesage
-
Set Environment Variables: Create your
sage.env
file in the root directory and fill in the necessary environment variables: For example:AZURE_API_KEY="sample token" AZURE_API_BASE="" AZURE_API_VERSION="" GITLAB_PASSWORD="sample token" CHAINLIT_AUTH_SECRET="sample secret" COHERE_API_KEY="sample key" JIRA_PASSWORD="sample token" SAGE_HOME="path to your docker compose directory" HF_TOKEN="Hugging face hub API token"
-
Prepare Configuration: Edit the
config.toml
file to set up your Sage configuration according to your needs. -
Run Docker Compose: Use the provided
docker-compose.yml
file to start Sage:docker-compose --env-file sage.env up -d
-
Verify Installation: Once the container is running, navigate to
http://localhost:8080
in your web browser to access Sage.
To update Sage to the latest version, pull the new image and restart the service:
docker-compose pull docker-compose up -d