A library for helping to deploy a Numer.ai compute node
Project description
numerai-cli
CLI to set up a Numerai Compute node in AWS (Amazon Web Services) and deploy your models to it. This solution is architected to cost less than $5/mo on average (actual costs may vary). It has been tested and found working on MacOS/OSX, Windows 10, and Ubuntu 18.04, but should theoretically work anywhere that Docker and Python 3 are available.
IMPORTANT
If you have other questions or feedback, please join us on the RocketChat #compute Channel. Before posting a messaging the Rocketchat channel or creating a Github issue, please read through the following:
If you still cannot find a solution or answer, include the following information with your issue/message:
- The command you ran that caused the error
- Version from running
pip3 show numerai-cli
- System Information from running
- Mac:
system_profiler SPSoftwareDataType && system_profiler SPHardwareDataType
- Linux:
lsb_release -a && uname -a
- Windows:
powershell -command "Get-ComputerInfo"
- Mac:
If you do not include this information, we cannot help you.
Contents
Prerequisites
- An AWS (Amazon Web Services) Account
- AWS Billing set up
- AWS Access Keys (See the wiki for detailed instructions)
- Numerai API Keys
- Python and Docker (see Environment Setup)
Our friend Arbitrage created this tutorial to help you get set up with your AWS/Numerai API Keys
Environment Setup
For your convenience, we've included setup scripts in the scripts
directory that will ensure the prerequisites are installed.
You can download and run the setup script for your OS with one of the following commands:
-
Mac Terminal (cmd + space, type
terminal
, selectterminal.app
):curl https://raw.githubusercontent.com/numerai/numerai-cli/master/scripts/setup-mac.sh | bash
-
Ubuntu 18 Terminal (ctrl + alt + t):
apt update && apt install -y libcurl4 curl && curl https://raw.githubusercontent.com/numerai/numerai-cli/master/scripts/setup-ubu18.sh | bash
-
Windows Command Prompt (windows key, type
cmd
, select Command Prompt):powershell -command "$Script = Invoke-WebRequest 'https://raw.githubusercontent.com/numerai/numerai-cli/master/scripts/setup-win10.ps1'; $ScriptBlock = [ScriptBlock]::Create($Script.Content); Invoke-Command -ScriptBlock $ScriptBlock"
If you run into issues running one of these scripts, please report immediately to RocketChat Compute Channel.
After the setup script confirms Python and Docker, install numerai-cli
via:
pip3 install numerai-cli
Quickstart
If you know you have all the prerequisites and have your AWS and Numerai API Keys at hand, you can run these commands to get the example application running in minutes:
mkdir example-numerai
cd example-numerai
numerai setup
numerai docker copy-example
numerai docker deploy
Your compute node is now setup and ready to run. It saves the webhook URL in .numerai/submission_url.txt
that triggers your docker container.
You can configure your Numerai account to use this webhook by entering it in the "Compute" section.
It will be called Saturday morning right after a new round opens, and if your job fails (one ore more models have not submitted successfully)
then it will be triggered again around 24 hours later.
NOTE: The default example does not make stake changes; you will still have to do that manually. Please refer to the numerapi docs for the methods you must call to do this.
Testing
-
Test webhook URL (schedule a job in the cloud):
numerai compute test-webhook
-
Check your job status:
numerai compute status
-
View logs for "RUNNING" Job:
numerai compute logs
-
You can test locally too:
numerai docker run
-
NOTES:
- You can also view logs in the console for your ECS Cluster and your Container
- Scheduling a job does not immediately run the container. This takes several minutes the first time it runs, with subsequent runs starting a lot faster.
Commands
To get descriptions of each command available, run one of these:
numerai
numerai --help
numerai [command] --help
numerai [command] [sub-command] --help
Uninstall
Destroy the AWS environment
numerai destroy
And then uninstall the package:
pip3 uninstall numerai-cli
Contributions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file numerai-cli-0.2.5.tar.gz
.
File metadata
- Download URL: numerai-cli-0.2.5.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 652756e1f831680373f9ee6eea05ca2e6cfa87276374f3594bea8130150d9f4c |
|
MD5 | cb79ebbd76e869a7dc03918f2c531bcd |
|
BLAKE2b-256 | f9d728d4ab99aca34e87ab2b496279f24a736d71fb7925bfee7c9e1e5cddabe5 |
Provenance
File details
Details for the file numerai_cli-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: numerai_cli-0.2.5-py3-none-any.whl
- Upload date:
- Size: 5.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d7ee43b11fc2d87f9189b9dd9de0a912c71522ed32836b6b9b484098406e159 |
|
MD5 | e80d764c5480dd1a6d5e85f1ad81292c |
|
BLAKE2b-256 | 1103446b921ca807c7736db91dbcbadd648de5b02e57bd5d9b90b723b17a5e2f |