# Jetson Nano 4GB

Make sure you have installed JetPack 4.6 on your Jetson Nano and have Internet connection.

On your Jetson:

  1. Install docker-compose
wget https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-aarch64 \
&& chmod +x docker-compose-linux-aarch64 \
&& sudo mv docker-compose-linux-aarch64 /usr/local/bin/docker-compose
  1. Copy file docker-compose.yaml
services:
  aidws-frontend:
    image: onestepai/aidws-frontend:latest
    restart: unless-stopped
    environment:
      - NGINX_ENVSUBST_TEMPLATE_DIR=/nginx/templates
      - AIDWS_AICS_ADDRESS=XXX.XXX.XXX.XXX
    ports:
      - 443:5443
  aidws-postgres:
    image: postgres:14.2
    restart: unless-stopped
    environment:
      POSTGRES_USER: aidws
      POSTGRES_PASSWORD: YYYYY
      POSRGRES_DB: aidws
    volumes:
      - aidws-pgdata:/var/lib/postgresql/data
  aidws-backend:
    image: onestepai/aidws-backend:latest
    restart: unless-stopped
    environment:
      - DOTNET_URLS=http://0.0.0.0:8081
      - DatabaseConnection=User ID=aidws;Password=YYYYY;Server=aidws-postgres;Port=5432;Database=aidws;Integrated Security=true;Pooling=true;
      - AppSettings__AicsAddress=http://XXX.XXX.XXX.XXX:8082
      - AppSettings__OsaiAddress=https://ZZZZZ
    volumes:
      - aidws-upload:/app/data/UploadData
      - aidws-output:/app/data/AicsOutput
      - aidws-poster:/app/data/Posters
      - aidws-models:/app/data/Models
      - aidws-hls:/app/data/Hls
      - aidws-aics-uplaods:/app/data/Uploads
      - /dev/:/dev/
  aidws-aics:
    image: onestepai/aidws-aics:latest
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - aidws-upload:/app/data/UploadData
      - aidws-output:/app/data/AicsOutput
      - aidws-poster:/app/data/Posters
      - aidws-models:/app/data/Models
      - aidws-hls:/app/data/Hls
      - aidws-aics-uplaods:/app/data/Uploads
      - /dev/:/dev/
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
volumes:
  aidws-upload:
  aidws-output:
  aidws-poster:
  aidws-models:
  aidws-hls:
  aidws-aics-uplaods:
  aidws-pgdata: 
  1. In the docker-compose.yaml file replace all XXX.XXX.XXX.XXX occurencies to the IP address of your device

- AIDWS_AICS_ADDRESS=XXX.XXX.XXX.XXX

and

- AppSettings__AicsAddress=http://XXX.XXX.XXX.XXX:8082

For your safety, set new password instead default password for Postgres. Change YYYYY in:

POSTGRES_PASSWORD: YYYYY

and

- DatabaseConnection=User ID=aidws;Password=YYYYY;Server=aidws-postgres;Port=5432;Database=aidws;Integrated Security=true;Pooling=true;

Replace ZZZZZ with the address of the site you want to connect your device to. Currently you should enter one of the following sites: app-eu.onestepai.com or app-us.onestepai.com.

- AppSettings__OsaiAddress=https://ZZZZZ

  1. Run docker-compose
sudo docker-compose up -d -f docker-compose.yaml

# AI'VIEWER Update

To update personal AI'VIEWER, go to the folder where AI'VIEWER was installed. Then run the following command:

sudo docker compose pull && sudo docker compose up -d

This will download the latest AI'VIEWER image and restart AI'VIEWER with the latest changes.