GithubHelp home page GithubHelp logo

ging / fiware-ml-supermarket Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 1.0 297 KB

Demo: Predicting purchase volume in a supermarket using FIWARE

Shell 7.72% JavaScript 65.60% CSS 3.83% HTML 4.94% Scala 9.02% Dockerfile 4.33% Python 4.56%
fiware fiware-cosmos fiware-draco machine-learning spark spark-streaming spark-mllib socket-io universidad-politecnica-madrid ging

fiware-ml-supermarket's Introduction

FIWARE Machine Learning - Supermarket example

  • Clone this project
git clone https://github.com/ging/fiware-ml-supermarket
cd fiware-ml-supermarket
  • Run the whole scenario
docker-compose up

fiware-ml-supermarket's People

Contributors

anmunoz avatar sonsoleslp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

rihabfekii

fiware-ml-supermarket's Issues

Connection to MongoDb unsuccessful

When running the docker-compose up I have the following logs :
Screenshot 2020-08-10 at 11 25 18

And when I open the browser at http://localhost:3000/ :
I have the following log :

Screenshot 2020-08-10 at 11 56 44

The following is the docker-compose.yml that I am using, It is different than the existing yml file in the project on Github

`version: "3.5"
services:

Orion is the context broker

orion:
image: fiware/orion:2.4.0
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
networks:
- default
ports:
- "1026:1026" # localhost:1026
command: -dbhost mongo-db -logLevel DEBUG -noCache
healthcheck:
test: curl --fail -s http://orion:${ORION_PORT}/version || exit 1

Databases

mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
expose:
- "27017"
ports:
- "27017:27017" # localhost:27017 # localhost:27017
networks:
- default
command: --bind_ip_all --smallfiles
volumes:
- mongo-db:/data
healthcheck:
test: |
host=hostname --ip-address || echo '127.0.0.1';
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
web:
container_name: web
build:
context: ./web
ports:
- "3000:3000"
depends_on:
- orion
networks:
- default
command: bash -c "sh /entities/createPredictionEntities.sh && sh /entities/subscribeReqPredictionTicket.sh && sh /entities/subscribeResPredictionTicket.sh && npm start"
environment:
- URL_CB=http://orion:1026/v2/entities/ReqTicketPrediction1/attrs
- MONGO_URI=mongodb://mongo-db:27017
volumes:
- ./entities:/entities
spark-master:
image: bde2020/spark-master:2.4.4-hadoop2.7
container_name: spark-master
ports:
- "8088:8088"
- "7077:7077"
- "9001:9001"

depends_on:

- maven

environment:
  - INIT_DAEMON_STEP=setup_spark
  - "constraint:node==spark-master"
networks:
  - default
command: bash -c "sleep 12 && sh /prediction-job/run-spark-jobs.sh"
volumes:
  - ./prediction-job:/prediction-job

spark-worker-1:
image: bde2020/spark-worker:2.4.4-hadoop2.7
container_name: spark-worker-1
depends_on:
- spark-master
ports:
- "8081:8081"
environment:
- "SPARK_MASTER=spark://spark-master:7077"
- "constraint:node==spark-master"
networks:
- default
maven:
image: ging/maven
container_name: maven
expose:
- "8092"
ports:
- "8092:8092"
environment:
- "SPARK_MASTER=spark-master:7077"
volumes:
- ./prediction-job:/prediction-job
networks:
- default
draco:
image: ging/fiware-draco
container_name: draco
depends_on:
- orion
environment:
- NIFI_WEB_HTTP_PORT=9090
ports:
- "9090:9090"
- "5050:5050"
networks:
- default

python:
image: python:3
container_name: python
depends_on:
- draco
environment:
- DRACO_ENDPOINT=draco:9090
networks:
- default
command: bash -c "pip install --no-cache-dir -r /entities/requirements.txt && python /entities/runDraco.py && sh /entities/subscribeResPredictionTicketDraco.sh"
volumes:
- ./entities:/entities

networks:
default:
ipam:
config:
- subnet: 172.18.1.0/24

volumes:
mongo-db: ~`

I am wondering how to fix the unsuccessful connection from the web to MongoDB ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.