Sign inSign up

srijanverma44/grid-node

By srijanverma44

•Updated about 6 years ago

Create PyGrid Nodes using this container. Stable tag : v028

Image
0

194

srijanverma44/grid-node repository overview

⁠NOTE: Images given here have been taken from OpenMined Stack⁠. Refer PySyft⁠ & PyGrid⁠ repositories for more details!

  1. docker pull srijanverma44/grid-node:v026
  2. gridnode-compose.yml file given below :
version: '3'
services:
    redis:
        image: redis:latest
        expose:
        - 6379
        ports:
        - 6379:6379
    h1:
        image: srijanverma44/grid-node:v026
        environment:
                - ID=h1
                - PORT=3000
                - HOST=0.0.0.0
                - GRID_GATEWAY_HOST=0.0.0.0
                - GRID_GATEWAY_PORT=5000
                - GATEWAY_URL=http://0.0.0.0:5000
                - DB_URL=0.0.0.0:6379
        depends_on:
                - "redis"
        ports:
        - 3000:3000
        command: python -m gridnode --id=h1 --port=3000 --host=0.0.0.0 --gateway_url=http://0.0.0.0:5000
    h2:
        image: srijanverma44/grid-node:v026
        environment:
                - ID=h2
                - PORT=3001
                - ADDRESS=http://0.0.0.0:3001
                - HOST=0.0.0.0
                - GATEWAY_URL=0.0.0.0:5000
        depends_on:
                - "redis"
        ports:
        - 3001:3001
        command: python -m gridnode --id=h2 --port=3001 --host=0.0.0.0
  • You can edit the last line: command: ...
  • Execute the compose file using the following command: docker-compose -f gridnode-compose.yml up
    • Go to http://0.0.0.0:3000 & http://0.0.0.0:3001 and you'll be able to see the nodes which you created.

Additional info given below:

FROM python:3.7-slim

RUN apt-get update
RUN apt-get install -y git python3-pip

ENV PORT=5000

COPY ./pip-dep/requirements.txt /app/requirements.txt
WORKDIR /app

RUN pip3 install -r requirements.txt
COPY . /app
WORKDIR /app
  • docker build -t grid-node .

Tag summary

Content type

Image

Digest

Size

1.9 GB

Last updated

about 6 years ago

docker pull srijanverma44/grid-node:v028