No project description provided
Project description
Olas Operate
Electron + NextJS + Python Backend application to one-click run Agents.
Technologies Used
- Electron
- NextJS (20.11 LTS)
- AntD
- TypeScript
- Python (3.10)
- Poetry (1.7.1)
- Docker (24)
Getting Started
Installing system dependencies
The following installation scripts assume you have the following on each OS:
- Linux: a debian based operating system such as Ubuntu with
apt
to install packages. - MacOS: Homebrew
- Windows: Chocolatey
NodeJS via NVM
NodeJS is best installed and managed through NVM, which allows you to install and select the version of NodeJS you wish to use. For this project is the current LTS version 20.11.
Linux
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install --lts
nvm use --lts
MacOS
brew install nvm
Set up NVM for console usage. Dependant on the shell, you should edit the config file to contain the following code.
If you're using Bash or Zsh, you might add them to your ~/.bash_profile
, ~/.bashrc
, or ~/.zshrc
file:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Close and reopen Terminal, or run source ~/.bash_profile
, source ~/.zshrc
, or source ~/.bashrc
to reload the shell configuration.
Verify your installation by running nvm --version
. Then run:
nvm install --lts
nvm use --lts
Yarn
npm install --global yarn
Python
Linux
sudo apt install python3
MacOS
brew install python
PIPX
Linux
sudo apt install pipx
MacOS
brew install pipx
Poetry
pipx install poetry
If promoted to run pipx ensurepath
, run this command.
Docker
Linux
You can change the ubuntu.22.04~jammy
version to your OS in the following command:
VERSION_STRING=5:24.0.7-1~ubuntu.22.04~jammy
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
If you are unsure of your current release version and codename to update the VERSION_STRING above, you can run:
lsb_release -a
MacOS
You must install Docker V24 manually, as brew does not allow for versioning with Docker.
- Docker Desktop version that supports Docker V24: https://docs.docker.com/desktop/release-notes/#4261
- Guide to install: https://docs.docker.com/desktop/install/mac-install/
Setup ENV file
Create a .env
file in the root directory, or rename .env.example
to .env
.
NODE_ENV
For development usage, set NODE_ENV=development
.
For production usage, set NODE_ENV=production
.
FORK_URL
Required for forking Gnosis using a Hardhat node during development.
You can get a Gnosis RPC from Nodies.
Then, set FORK_URL=https://....
in your .env file.
Be sure to set an external RPC here.
Install project dependencies
This will install the required dependencies for the backend, frontend, and electron.
yarn install-deps
Run the development app
In the root directory, run:
yarn start
This will run Electron, which launches NextJS and the Backend as child processes.
Starting Hardhat (for development)
In the interest of not losing funds, we can run a Hardhat node that forks Gnosis -- provided the FORK_URL has been set to an external RPC in your .env file.
Run the following to start your Hardhat node:
npx hardhat node
Once Hardhat is running, you can use http://localhost:8545
during the agent spawning process as your RPC.
Funding addresses while running a Hardhat fork
There are a number of scripts to fund addresses for testing:
- XDAI funding:
poetry run python scripts/fund.py 0xYOURADDRESS
- OLAS funding:
TBA
Further notes / issues
- Only one agent can be run at a time.
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
Hashes for olas_operate_middleware-0.1.0rc8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41149a2bd19c045d15247ff7962bf8ae26a8656364638f221385fd72d6f6a917 |
|
MD5 | ac7e5f5fc7c0d00f8d38def7cb8643c3 |
|
BLAKE2b-256 | d222dc91171f9f5c12f72fbef4ec6b6962b4e66e69f3a3fde86b4f32a9648c5c |
Hashes for olas_operate_middleware-0.1.0rc8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ecf73ef7c42edb9f81d70875d13486398be0af59d6aaf5f523fa677c75a434c |
|
MD5 | db3a22a4d9df9a7d9a35a569e0083c46 |
|
BLAKE2b-256 | ed3583725eedf8d85fb39f93b77f4263caa1b537043dcdbcd18c638a5c114294 |