-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Bennett Wu edited this page May 5, 2025
·
3 revisions
Node server and whisper service have prebuild Docker containers to help you get up and running easily. See Docker Deployment for instructions. If you don't wish to use Docker, node server and whisper service can also be run natively. See Native Deployment for instructions.
Before you start
- Ensure you have Docker installed
- https://www.docker.com/
- If you'd like to use CUDA, make sure you have the Nvidia Container Toolkit installed as well
- Clone this repository and
cd
into itgit clone https://github.com/scribear/ScribeAR-NodeServer && cd ScribeAR-NodeServer
- Full Stack Deployment - Intended for deploying the ScribeAR frontend, node server, and whisper service on the same device (e.g. for kiosk mode)
- Node Server Container - For deploying node server alone
- Whisper Service Container - For deploying whisper service alone
- Move into the
deployment
directorycd deployment
- Make a copy of
template.env
and name it.env
- Make a copy of
device_config.template.json
and name itdevice_config.json
- Edit
.env
anddevice_config.json
to configure both whisper service and node server.- Note: Configuration for Docker compose is modified from regular configuration.
-
HOST
andPORT
for whisper service and node server are disabled. -
WHISPER_SERVICE_ENDPOINT
for node server is disabled. -
NODE_PORT
is added to configure the port node server will listen on (replacesPORT
). -
FRONTEND_PORT
is added to be used for the ScribeAR frontend container. This is the port the frontend will listen on -
SCRIBEAR_URL
is added to configure the Frontend URL users who scan the QR code will be given. See Kiosk Mode for details. -
WHISPER_SERVICE_CUDA
is added (eithertrue
orfalse
) to choose if whisper service is deployed with cuda support or not. - Everything else remains the same.
-
- See Configuring Docker Containers for details about configuration.
- Note: Configuration for Docker compose is modified from regular configuration.
- Pull the latest version of the Docker images
- For CPU only deployment
docker compose -f ./compose_cpu.yaml pull
- For CUDA deployment
docker compose -f ./compose_cuda.yaml pull
- For CPU only deployment
- Start containers and browser
./docker-autostart.sh
- This will run
docker compose -f ./compose_{cpu|cuda}.yaml up d
and then open ScribeAR using Google Chrome in kiosk mode. - When Google Chrome exits the containers will be stopped.
- This will run
- Move into the
node-server
directorycd node-server
- Make a copy of
template.env
and name it.env
- Edit
.env
to configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINT
andSOURCE_TOKEN
default. - See Configuring Node Server for details about each option.
- The template already contains sensible defaults. A good place to start is to leave every thing except
- Pull the latest version of the Docker image
docker pull scribear/node-server:main
- Start the container (listening on port
8000
)docker run -p 8000:80 --env-file .env scribear/node-server:main -d
- Ensure you have Docker installed
- https://www.docker.com/
- If you'd like to use CUDA, make sure you have the Nvidia Container Toolkit installed as well
- Clone this repository and navigate to the
deployment
foldergit clone https://github.com/scribear/ScribeAR-NodeServer && cd deployment
- Make a copy of
template.env
and name it.env
- Make a copy of
device_config.template.json
and name itdevice_config.json
- Edit
.env
anddevice_config.json
to configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEY
default. - See Configuring Docker Containers for details about configuration.
- The templates already contain sensible defaults. A good place to start is to leave every thing except
- Pull the latest version of the Docker image
- For CPU only deployment
docker pull scribear/whisper-service-cpu:main
- For CUDA deployment
docker pull scribear/whisper-service-cuda:main
- For CPU only deployment
- Start the container (listening on port
8000
)- For CPU only deployment
docker run -p 8000:80 --env-file .env -v ./device_config.json:/app/device_config.json scribear/whisper-service-cpu:main -d
- For CUDA deployment
docker run -p 8000:80 --env-file .env -v ./device_config.json:/app/device_config.json scribear/whisper-service-cuda:main -d
- For CPU only deployment
Deploys node-server, whisper-service, and ScribeAR frontend to be running on the same system.
- Ensure Node.js, Python 3, and Google Chrome are installed on your machine
- Clone this repository
git clone https://github.com/scribear/ScribeAR-NodeServer
- Setup whisper-service
cd ScribeAR-NodeServer/whisper-service
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
- Make a copy of
device_config.template.json
and name itdevice_config.json
- Edit
.env
anddevice_config.json
to configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEY
default. - See Configuring Whisper Service for details about configuration.
- The templates already contain sensible defaults. A good place to start is to leave every thing except
- Build node-server
cd ../node-server
npm install
npm run build
- Edit
.env
to configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINT
andSOURCE_TOKEN
default. - See Configuring Node Server for details about each option.
- The template already contains sensible defaults. A good place to start is to leave every thing except
- Move to the
deployment
directorycd ../deployment
- Configure the
aio-autostart.sh
script by editing the beginning of the script to change these variables:-
NODE_PORT
is the port the node server is listening on. This should match what was configured in.env
-
SOURCE_TOKEN
is the source token the node server is configured with. This should match what was configured in.env
-
SCRIBEAR_URL
is added to configure the Frontend URL users who scan the QR code will be given. See Kiosk Mode for details.
-
- The
aio-autostart.sh
script can then be used to start whisper service, node server, and google chrome automatically../aio-autostart.sh
Note: The aio-autostart.sh
script can then be used to start whisper service, node server, and google chrome automatically on startup. Set this to automatically run on login with a user that is automatically logged in to have a hands free startup.
- For Ubuntu, this can be achieved using by creating the following file at
~/.config/autostart/aio-autostart.desktop
[Desktop Entry] Type=Application Exec= { PATH TO aio-autostart.sh SCRIPT } NoDisplay=false X-GNOME-Autostart-enabled=true Terminal=true
- Ensure that Node.js is installed on your machine
- Clone this repository
git clone https://github.com/scribear/ScribeAR-NodeServer
- Build node-server
cd ../node-server
npm install
npm run build
- Edit
.env
to configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINT
andSOURCE_TOKEN
default. - See Configuring Node Server for details about each option.
- The template already contains sensible defaults. A good place to start is to leave every thing except
- Start the server
npm start
- Ensure Python 3 is installed on your machine
- Clone this repository
git clone https://github.com/scribear/ScribeAR-NodeServer
- Setup whisper-service
cd ScribeAR-NodeServer/whisper-service
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
- Make a copy of
device_config.template.json
and name itdevice_config.json
- Edit
.env
anddevice_config.json
to configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEY
default. - See Configuring Whisper Service for details about configuration.
- The templates already contain sensible defaults. A good place to start is to leave every thing except
- Start the service
python index.py