Linux sandbox2
Stage PGML Sandbox Setup for Linux
The instructions are very simple. Incase your setting up a dedicated server VM instance to run PGML.
Hardware Requirements
Memory 16GB
CPU : 4 cores.
Storage 100GB
(Make sure the Storage is using SSD drive, else PostgresML has performance issues.
Operating System
Install Ubuntu Server 24.04 LTS
Installation Script
apt-get -y -qq install curl
clear
bash <(curl -s https://unovie.ai/docs/assets/sandbox2.sh)
starting server
cd /opt/sandbox2
docker-compose up -d
docker-compose ps # to see the docker containers
docker-compose logs # to see the logs, use -f to follow logs.
First time will take time for postgresml to initialize. Wait for few minutes for Tables and Plugins to be loaded, check docker logs.
Web-IDE
http://vm_ip_address (port 80)
It's a vscode editor built with theia.
Features :
- Code Editor
- Access to Terminal
- Python 3.11 built in.
- Korvus Python Library
- GIT Commands
Developer Terminal Access
Sometimes you wanted to use ssh into terminal and code or run long running programs. WebIDE container comes with all the required python versions required.
To connect it to it using terminal access
docker exec -it webide /bin/bash
cd /home/project/pallete-tracking
GIT Setup via Terminal Access
Following are Instructions to setup git for pallete tracking
requires you get github token for authentication at https://github.com/settings/tokens
Generate new token (classic)
Give requried permissions to read/write to repos
Copy the generated token into local file.
At Terminal
docker exec -it webide /bin/bash
cd /home/project
gh auth login
gh repo clone unovie-ai/pallete-tracking

PGAdmin4
PG Admin4 is a the web interface for Postgres database.
http://vm_ip_address:88 (port 88)
Features :
- Connect to any database server
- Access Databases, Tables.
- Write SQL Queries and Execute them
- Create new databases.
- Access PostgresML database and see inner workings
Authentication : - id:admin@unovie.com password:unovie2024
Add new Server >
General > name : postgresml_server
connection > Hostname : postgres_ml
connection > username : postgresml
connection > password : postgresml
Save


PGML Notebook Web Interface
PostgresML Web Interface.
http://vm_ip_address:8000 (port 8000)
Features :
- Add or Execute Jupyter Notebooks
- Run Analytical Results and see the responses.
PSQL
Postgres SQL Command line interface
vm_ip_address port: 5432
apt-get install postgresql-client
psql -h 127.0.0.1 -p 5432 -U postgresml -w postgresml
General Guidance
- Write all your python programs using web-ide in /home/project/
- Eventually we will build Dockerfile to create container with your python program
- Given that postgresML already installs Postgres database, create other databases as needed to support the manufacturing business usecases.
- The id and passwords shared here are only in sandboxes and staging. Real production environments are completely locked down for security.
- Make sure you follow strict ACL policies when accessing databases with permissions.
- This will not install any DIFY tools, as server is only meant to run real AI/ML workloads.
Reinstall on existing VM
If you happen to already have prior version running follow this cleanup
cd /opt/postgresml
docker-compose stop
cd /opt
rm -rf postgresml
rm -rf tools
docker system prune
docker system prune --volumes
bash <(curl -s https://unovie.ai/docs/assets/sandbox2.sh)