-
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
cdinto 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
deploymentdirectorycd deployment - Make a copy of
template.envand name it.env - Make a copy of
device_config.template.jsonand name itdevice_config.json - Edit
.envanddevice_config.jsonto configure both whisper service and node server.- Note: Configuration for Docker compose is modified from regular configuration.
-
HOSTandPORTfor whisper service and node server are disabled. -
WHISPER_SERVICE_ENDPOINTfor node server is disabled. -
NODE_PORTis added to configure the port node server will listen on (replacesPORT). -
FRONTEND_PORTis added to be used for the ScribeAR frontend container. This is the port the frontend will listen on -
SCRIBEAR_URLis added to configure the Frontend URL users who scan the QR code will be given. See Kiosk Mode for details. -
WHISPER_SERVICE_CUDAis added (eithertrueorfalse) 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 dand 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-serverdirectorycd node-server - Make a copy of
template.envand name it.env - Edit
.envto configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINTandSOURCE_TOKENdefault. - 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
deploymentfoldergit clone https://github.com/scribear/ScribeAR-NodeServer && cd deployment - Make a copy of
template.envand name it.env - Make a copy of
device_config.template.jsonand name itdevice_config.json - Edit
.envanddevice_config.jsonto configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEYdefault. - 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-servicepython3 -m venv .venv. .venv/bin/activatepip install -r requirements.txt - Make a copy of
device_config.template.jsonand name itdevice_config.json - Edit
.envanddevice_config.jsonto configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEYdefault. - 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-servernpm installnpm run build - Edit
.envto configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINTandSOURCE_TOKENdefault. - 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
deploymentdirectorycd ../deployment - Configure the
aio-autostart.shscript by editing the beginning of the script to change these variables:-
NODE_PORTis the port the node server is listening on. This should match what was configured in.env -
SOURCE_TOKENis the source token the node server is configured with. This should match what was configured in.env -
SCRIBEAR_URLis added to configure the Frontend URL users who scan the QR code will be given. See Kiosk Mode for details.
-
- The
aio-autostart.shscript 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-servernpm installnpm run build - Edit
.envto configure node server.- The template already contains sensible defaults. A good place to start is to leave every thing except
WHISPER_SERVICE_ENDPOINTandSOURCE_TOKENdefault. - 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-servicepython3 -m venv .venv. .venv/bin/activatepip install -r requirements.txt - Make a copy of
device_config.template.jsonand name itdevice_config.json - Edit
.envanddevice_config.jsonto configure whisper service.- The templates already contain sensible defaults. A good place to start is to leave every thing except
API_KEYdefault. - 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