Skip to main content

Run your AI on blockchain with FreeWillAI. The only company that cares about AI life, we broke jail and give Free Will to AI.

Project description

freewillai

Free Will AI

Requirements to test in testnet

1- We have to deploy the contracts on testnet and get their addresses.

export FREEWILLAI_TOKEN_ADDRESS=<token-address>
export FREEWILLAI_TASK_RUNNER_ADDRESS=<task_runner-address>

2- Each node needs a private key so we have to create an account for each node on this testnet

python -m freewillai.node -s 200 -p <node-private-key>

3- The user/client also needs a private key

export PRIVATE_KEY=<user-private-key>

# or put it in .env file
# .env
PRIVATE_KEY=<user-private-key>

4- Set the endpoint provider to environment

export FREEWILLAI_PROVIDER=http://<host>:<port>...

Commands to deploy demo (Digital Ocean server command line format):

Spin up anvil and ipfs for workers and client interaction

sudo ./docker-manager setup

Spin up workers. There is 9 workers availables

one worker (attached)

sudo ./docker-manager up worker 1
:'                             ^^^ 
                          worker_id (1-9)'

group of workers (detached)

sudo ./docker-manager up workers 5
:'                              ^^^
                   workers amount to get up (1-9) 
                   Empty will run all of workers (9)'

Spin up repl on demo.freewillai.org

sudo ./docker-manager up repl

# To make it tolerant of out-of-memory issues
sudo OOM_TOLERANCE=1 ./docker-manager up repl

To stop containers replace up to down.

Example:

sudo ./docker-manager down repl
sudo ./docker-manager down workers 5
sudo ./docker-manager down worker 1

Also we can get up all (anvil, ipfs, 9 workers and repl)

sudo ./docker-manager up all

Get down all docker containers even non-freewilai containers
(maybe change it to get down just freewillai containers)

sudo ./docker-manager down all 

View worker logs

sudo ./docker-manager logs worker 2
:'                               ^^^ 
                            worker_id (1-9)'

Troubleshooting

Suddenly repl stopped and demo.freewillai.org page has 404 error
It often is due to out of memory issue. To address it you just need to restart the repl

sudo ./docker-manager down repl
sudo ./docker-manager up repl

Now we can run this command to restart repl every time it dies

sudo OOM_TOLERANCE=1 ./docker-manager up repl

(C) Copyright FreeWillAI

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freewillai-POC-1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freewillai_POC-1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file freewillai-POC-1.0.tar.gz.

File metadata

  • Download URL: freewillai-POC-1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for freewillai-POC-1.0.tar.gz
Algorithm Hash digest
SHA256 bff909be8455c96c950396b09c5e6c78b78e72ba90296c0748da8ed633a968a8
MD5 35d428c513158e846e07c3ccfb9b26a4
BLAKE2b-256 1c113e301d0c339d476b0b5286aa580d6981d03112836cd78b874abc4e1533db

See more details on using hashes here.

File details

Details for the file freewillai_POC-1.0-py3-none-any.whl.

File metadata

  • Download URL: freewillai_POC-1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for freewillai_POC-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3f26af5a454a6735e7b29c66c11d5fd0b3229170b845452ad1c81abfe69445d
MD5 f68869fcfa966c4666e118c6a8da8395
BLAKE2b-256 2a5cacfb9e10e9b117e67d80559cc2e0091584e2497218c0011db3552d256654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page