- Clone this project
git clone https://github.com/ging/fiware-ml-supermarket
cd fiware-ml-supermarket
- Run the whole scenario
docker-compose up
-
Open browser in http://localhost:3000
-
Select a date and time range
-
Predict!
Demo: Predicting purchase volume in a supermarket using FIWARE
git clone https://github.com/ging/fiware-ml-supermarket
cd fiware-ml-supermarket
docker-compose up
Open browser in http://localhost:3000
Select a date and time range
Predict!
When running the docker-compose up I have the following logs :
And when I open the browser at http://localhost:3000/ :
I have the following log :
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:
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
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"
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 ?
Connection to MongoDb unsuccessful?
please any one can solve this issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.