Skip to content

Commit

Permalink
Fix #1194 Confusion on the 'Download barge and run services section' …
Browse files Browse the repository at this point in the history
…from install.md (#1195)

* Fix #1194 Confusion on the 'Download barge and run services section' from install.md
* More tweaks to streamline flow
  • Loading branch information
trentmc authored Dec 13, 2022
1 parent 65f1483 commit 54c86c0
Showing 1 changed file with 30 additions and 31 deletions.
61 changes: 30 additions & 31 deletions READMEs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,36 @@ SPDX-License-Identifier: Apache-2.0
## Setup
This quickstart describes the required setup to run `ocean.py` flows.

### 🏗 Installation

#### ⚙️ Prerequisites
### 1. Prerequisites

- Linux/MacOS
- [Docker](https://docs.docker.com/engine/install/), [Docker Compose](https://docs.docker.com/compose/install/), [allowing non-root users](https://www.thegeekdiary.com/run-docker-as-a-non-root-user/)
- Python 3.8.5 - Python 3.10.4

### 2. Download barge and run services

Ocean `barge` runs ganache (local blockchain), Provider (data service), and Aquarius (metadata cache).

In a new console:

```console
# Grab repo
git clone https://github.com/oceanprotocol/barge
cd barge

# Clean up old containers (to be sure)
docker system prune -a --volumes

# Run barge: start Ganache, Provider, Aquarius; deploy contracts; update ~/.ocean
./start_ocean.sh
```

Now that we have barge running, we can mostly ignore its console while it runs.

### 3. Install ocean.py library

In a *new* console (separate from barge):

```console
# Create your working directory
mkdir my_project
Expand All @@ -23,25 +43,22 @@ cd my_project
# Initialize virtual environment and activate it. Install artifacts.
python3 -m venv venv
source venv/bin/activate
```

##### Install the library
```console
# Avoid errors for the step that follows
pip3 install wheel

# Install Ocean library. Allow pre-releases to get the latest v4 version.
pip3 install --pre ocean-lib

```

#### ⚠️ Known issues

- for M1 processors, `coincurve` and `cryptography` installation may fail due to missing packages, which come pre-packaged in other operating systems. Make sure you have `autoconf`, `automake` and `libtool` installed, e.g. using Homebrew or MacPorts.
#### Potential issues & workarounds

- Mac users: if you encounter an "Unsupported Architecture" issue, then install including ARCHFLAGS: `ARCHFLAGS="-arch x86_64" pip install ocean-lib`. [[Details](https://github.com/oceanprotocol/ocean.py/issues/486).]
- Issue: if you have an Apple M1 processor, `coincurve` and `cryptography` installation may fail due to dependency/compilation issues.
- Workaround: install them individually: `pip3 install coincurve && pip3 install cryptography`
- Issue: if you run MacOS, you may encounter an "Unsupported Architecture" issue.
- Workaround: install including ARCHFLAGS: `ARCHFLAGS="-arch x86_64" pip install ocean-lib`. [[Details](https://github.com/oceanprotocol/ocean.py/issues/486).]

### Configure brownie & network
### 4. Configure brownie & network

ocean.py uses brownie to connect to deployed smart contracts.
Please check that you have configured RPC URLs, gas prices and other settings to
Expand All @@ -63,26 +80,8 @@ Make sure that your wanted network name matches the corresponding brownie `id`.

Please check that you have configured all networks before proceeding. Here is a more complete sample from brownie itself: https://eth-brownie.readthedocs.io/en/v1.6.5/config.html.

### ⬇️Download barge and run services

Ocean `barge` runs ganache (local blockchain), Provider (data service), and Aquarius (metadata cache).

In a new console:

```console
# Grab repo
git clone https://github.com/oceanprotocol/barge
cd barge
# Clean up old containers (to be sure)
docker system prune -a --volumes
# Run barge: start Ganache, Provider, Aquarius; deploy contracts; update ~/.ocean
./start_ocean.sh
```


### 🔧 Set envvars
### 5. Set envvars

In the same console (or another one with venv activated):
```console
Expand Down

0 comments on commit 54c86c0

Please sign in to comment.