Skip to content

Deployment examples

Nathan Sarrazin edited this page Jun 3, 2024 · 2 revisions

Here are a list of ways you can deploy chat-ui

Run locally

git clone https://github.com/huggingface/chat-ui.git
cd chat-ui && npm i
npm run dev

Run as a docker image

There are two docker images. Use chat-ui if you have an external mongoDB you would like to use, and use chat-ui-db if you'd like an image with everything included. The image is configured using environment variables.

  1. Create a .env.local file with your config options
  2. Pass your env variables in three ways:
    1. Pass the whole .env.local with the env var DOTENV_LOCAL
    2. Bind mount the .env.local in the docker image
    3. Pass each env variable directly in the image.

Pass the whole .env.local with the env var DOTENV_LOCAL

DOTENV_LOCAL=$(<.env.local)  docker run  -e DOTENV_LOCAL chat-ui-db

Bind mount the .env.local in the docker image

docker run --mount type=bind,source="$(pwd)/.env.local",target=/app/.env.local chat-ui-db

Pass each env variable directly in the image.

docker run  -e MONGODB_URL=mongodb://localhost:27017 chat-ui-db

Kubernetes

Warning

This may change in ways that break your deployments as we improve HuggingChat and make the chart more stable.

This is what we use in production for HuggingChat. See chart folder.

Unraid

Coming soon !

Docker compose

With a mongo container

Coming soon !

With a text-generation-inference container

Coming soon !

With llama.cpp

Coming soon !