Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kailashahirwar committed Oct 19, 2020
1 parent ccf8d11 commit cf1acb6
Showing 1 changed file with 62 additions and 34 deletions.
96 changes: 62 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,78 @@
## Raven Distribution Framework (Public Beta)
<div align="center">
<img src="https://static.wixstatic.com/media/8e555b_b0053aa9f21e4ff2bed34105ef06189d~mv2_d_4703_2828_s_4_2.png/v1/fill/w_156,h_86,al_c,q_85,usm_0.66_1.00_0.01/RP-Logo-B.webp">
</div>

## Raven Distribution Framework(RDF)
https://www.ravenprotocol.com/

#### Goals of the Public Beta
1. Allow users to run a local instance of the Raven Server and Raven Client that can communicate with each other.
2. Test how simple computations are stored, passed, and processed between the Server to the Client.
3. Provide the foundation to allow developers to plug in their own libraries or algorithms to train using the Raven Distribution Framework.
4. Find bugs and security issues in the code base.

#### Installation Instructions
#### What is Raven Distribution Framework?
The foundation for any Machine Learning or Deep Learning Framework. Simply put, it is more like a decentralized calculator, comparable to a decentralized version of the IBM machines that were used to launch the Apollo astronauts. Apart from building ML/DL frameworks, a lot more can be done on it, such as maximizing yield on your favorite DeFi protocols like Compound and more!


#### Setup

1. Install and create a virtual environment

```
pip3 install virtualenv & virtualenv venv -p python3 & source venv/bin/activate
```

2. Install dependencies

```
pip3 install -r requirements.txt
```

3. Run socket server

```
python3 run_socket_server.py
```

4. Install redis-server

```
# Ubuntu
sudo apt install redis-server
[View the full turoial here.](https://medium.com/ravenprotocol/building-blocks-of-the-raven-distribution-framework-on-github-d200967bbec0)
# Mac
brew install redis
brew services start redis
```

1. Install dependencies - pip3 install -r requirements.txt
2. Setup and clean - python3 setup_n_clean.py
3. Run socket server - python3 run_socket_server.py
4. Open index.html in your browser
5. Run our application - python3 run_app.py
5. Specify MySQL database credentials in the common/constants.py file

```
MYSQL_HOST = "localhost"
MYSQL_PORT = "3306"
MYSQL_USER = "root"
MYSQL_PASSWORD = "password"
MYSQL_DATABASE = "rdf"
```

#### Docker Implementation
4. Open ravenclient/index.html in your browser

Create a docker image

sudo docker build -t raven .

Stop and remove all containers

sudo docker stop $(sudo docker ps -aq)
sudo docker rm $(sudo docker ps -aq)
```
ravenclient/index.html
```

Create and start the docker container
#### How to write operations?

sudo docker run --name raven_server -p 9999:9999 raven

Stop and remove the container
from ravop.core import Scalar, Tensor
a = Scalar(10)
b = Scalar(20)

sudo docker container stop raven_server
sudo docker container rm raven_server

Remove an image
# Calculate sum of a and b
c = a.add(b)

sudo docker rmi raven

Enter into the container
# Subtract b from a
d = a.sub(b)

sudo docker exec -it raven_server bash
# Matrix Multiplication
a = Tensor([[2,3,4],[3,4,5],[5,6,7]])
b = Tensor([[3],[4],[6]])
c = a.matmul(b)

#### How to contribute:

Expand Down

0 comments on commit cf1acb6

Please sign in to comment.