# freewillai
Free Will AI
# Requirements to test in testnet
1- We have to deploy the contracts on testnet and get their addresses.
```bash
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
```bash
python -m freewillai.node -s 200 -p <node-private-key>
```
3- The user/client also needs a private key
```bash
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
```bash
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
```bash
sudo ./docker-manager setup
```
## Spin up workers. There is 9 workers availables
### one worker (attached)
```bash
sudo ./docker-manager up worker 1
:' ^^^
worker_id (1-9)'
```
### group of workers (detached)
```bash
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
```bash
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:
```bash
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)
```bash
sudo ./docker-manager up all
```
## Get down all docker containers even non-freewilai containers <br>(maybe change it to get down just freewillai containers)
```bash
sudo ./docker-manager down all
```
## View worker logs
```bash
sudo ./docker-manager logs worker 2
:' ^^^
worker_id (1-9)'
```
# Troubleshooting
### Suddenly repl stopped and demo.freewillai.org page has 404 error <br>It often is due to out of memory issue. To address it you just need to restart the repl
```bash
sudo ./docker-manager down repl
sudo ./docker-manager up repl
```
Now we can run this command to restart repl every time it dies
```bash
sudo OOM_TOLERANCE=1 ./docker-manager up repl
```
(C) Copyright FreeWillAI
Raw data
{
"_id": null,
"home_page": "https://freewillai.org",
"name": "freewillai-POC",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "blockchain,web3,AI,machine learning,CI/CD,cloud",
"author": "FreeWillAI",
"author_email": "support@freewillai.org",
"download_url": "https://files.pythonhosted.org/packages/1c/11/3e301d0c339d476b0b5286aa580d6981d03112836cd78b874abc4e1533db/freewillai-POC-1.0.tar.gz",
"platform": null,
"description": "# freewillai\nFree Will AI\n\n# Requirements to test in testnet\n1- We have to deploy the contracts on testnet and get their addresses.\n\n```bash\nexport FREEWILLAI_TOKEN_ADDRESS=<token-address>\nexport FREEWILLAI_TASK_RUNNER_ADDRESS=<task_runner-address>\n```\n\n2- Each node needs a private key so we have to create an account for each node on this testnet\n\n```bash\npython -m freewillai.node -s 200 -p <node-private-key>\n```\n\n3- The user/client also needs a private key\n```bash\nexport PRIVATE_KEY=<user-private-key>\n\n# or put it in .env file\n# .env\nPRIVATE_KEY=<user-private-key>\n```\n4- Set the endpoint provider to environment\n```bash\nexport FREEWILLAI_PROVIDER=http://<host>:<port>...\n```\n\n\n# Commands to deploy demo (Digital Ocean server command line format):\n## Spin up anvil and ipfs for workers and client interaction\n```bash\nsudo ./docker-manager setup\n```\n## Spin up workers. There is 9 workers availables\n### one worker (attached)\n```bash\nsudo ./docker-manager up worker 1\n:' ^^^ \n worker_id (1-9)'\n```\n### group of workers (detached)\n```bash\nsudo ./docker-manager up workers 5\n:' ^^^\n workers amount to get up (1-9) \n Empty will run all of workers (9)'\n```\n## Spin up repl on demo.freewillai.org\n```bash\nsudo ./docker-manager up repl\n\n# To make it tolerant of out-of-memory issues\nsudo OOM_TOLERANCE=1 ./docker-manager up repl\n```\n\n## To stop containers replace up to down. \n### Example:\n```bash\nsudo ./docker-manager down repl\nsudo ./docker-manager down workers 5\nsudo ./docker-manager down worker 1\n```\n\n## Also we can get up all (anvil, ipfs, 9 workers and repl)\n```bash\nsudo ./docker-manager up all\n```\n## Get down all docker containers even non-freewilai containers <br>(maybe change it to get down just freewillai containers)\n```bash\nsudo ./docker-manager down all \n```\n\n## View worker logs\n```bash\nsudo ./docker-manager logs worker 2\n:' ^^^ \n worker_id (1-9)'\n```\n\n# Troubleshooting\n### Suddenly repl stopped and demo.freewillai.org page has 404 error <br>It often is due to out of memory issue. To address it you just need to restart the repl\n```bash\nsudo ./docker-manager down repl\nsudo ./docker-manager up repl\n```\nNow we can run this command to restart repl every time it dies\n```bash\nsudo OOM_TOLERANCE=1 ./docker-manager up repl\n```\n(C) Copyright FreeWillAI\n",
"bugtrack_url": null,
"license": "",
"summary": "Run your AI on blockchain with FreeWillAI. The only company that cares about AI life, we broke jail and give Free Will to AI.",
"version": "1.0",
"project_urls": {
"Homepage": "https://freewillai.org",
"website": "https://freewillai.org"
},
"split_keywords": [
"blockchain",
"web3",
"ai",
"machine learning",
"ci/cd",
"cloud"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2a5cacfb9e10e9b117e67d80559cc2e0091584e2497218c0011db3552d256654",
"md5": "f68869fcfa966c4666e118c6a8da8395",
"sha256": "a3f26af5a454a6735e7b29c66c11d5fd0b3229170b845452ad1c81abfe69445d"
},
"downloads": -1,
"filename": "freewillai_POC-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f68869fcfa966c4666e118c6a8da8395",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2210,
"upload_time": "2023-07-09T06:22:01",
"upload_time_iso_8601": "2023-07-09T06:22:01.403740Z",
"url": "https://files.pythonhosted.org/packages/2a/5c/acfb9e10e9b117e67d80559cc2e0091584e2497218c0011db3552d256654/freewillai_POC-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c113e301d0c339d476b0b5286aa580d6981d03112836cd78b874abc4e1533db",
"md5": "35d428c513158e846e07c3ccfb9b26a4",
"sha256": "bff909be8455c96c950396b09c5e6c78b78e72ba90296c0748da8ed633a968a8"
},
"downloads": -1,
"filename": "freewillai-POC-1.0.tar.gz",
"has_sig": false,
"md5_digest": "35d428c513158e846e07c3ccfb9b26a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 3840,
"upload_time": "2023-07-09T06:22:05",
"upload_time_iso_8601": "2023-07-09T06:22:05.495943Z",
"url": "https://files.pythonhosted.org/packages/1c/11/3e301d0c339d476b0b5286aa580d6981d03112836cd78b874abc4e1533db/freewillai-POC-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-09 06:22:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "freewillai-poc"
}