PokemonGoers / PokeData

In this project you will scrape as much data as you can get about the *actual* sightings of Pokemons. As it turns out, players all around the world started reporting sightings of Pokemons and are logging them into a central repository (i.e. a database). We want to get this data so we can train our machine learning models. You will of course need to come up with other data sources not only for sightings but also for other relevant details that can be used later on as features for our machine learning algorithm (see Project B). Additional features could be air temperature during the given timestamp of sighting, location close to water, buildings or parks. Consult with Pokemon Go expert if you have such around you and come up with as many features as possible that describe a place, time and name of a sighted Pokemon. Another feature that you will implement is a twitter listener: You will use the twitter streaming API (https://dev.twitter.com/streaming/public) to listen on a specific topic (for example, the #foundPokemon hashtag). When a new tweet with that hashtag is written, an event will be fired in your application checking the details of the tweet, e.g. location, user, time stamp. Additionally, you will try to parse formatted text from the tweets to construct a new “seen” record that consequently will be added to the database. Some of the attributes of the record will be the Pokemon's name, location and the time stamp. Additional data sources (here is one: https://pkmngowiki.com/wiki/Pok%C3%A9mon) will also need to be integrated to give us more information about Pokemons e.g. what they are, what’s their relationship, what they can transform into, which attacks they can perform etc.
Apache License 2.0
9 stars 6 forks source link

Add java to the docker container #182

Closed Aurel-Roci closed 7 years ago

Aurel-Roci commented 7 years ago

Hi guys,

the package that will be created needs java to run. Can you add java to the docker container. Look at this issue https://github.com/PokemonGoers/PredictPokemon-2/issues/60#issuecomment-253163369

Thanks

jonas-he commented 7 years ago

@swathi-ssunder java installation doesn't seem that straight forward, here might be some advice: http://stackoverflow.com/questions/36608753/install-java-successfully-using-the-dockerfile-however-its-says-java-command-not http://www.massimochericoni.com/2015/02/27/how-to-run-a-java-program-in-a-docker-container/

swathi-ssunder commented 7 years ago

@jonas-he - Yes, I already went through the links. Trying it on my local docker. But couldn't get it working yet.

sacdallago commented 7 years ago

hmm. Interesting! And I was told life was easy 😆

Aurel-Roci commented 7 years ago

Hey guys, you can also include the prediction package in your npm dependencies now, Just add the following name dependency predict-pokemon

swathi-ssunder commented 7 years ago

@sacdallago - This is the Dockerfile I tried(to include java).

FROM ubuntu:14.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
#RUN apt-get -qq update

#RUN apt-get install -y -q python-software-properties software-properties-common
#RUN add-apt-repository ppa:webupd8team/java
#RUN apt-get update

RUN apt-get install -y default-jre
RUN apt-get install -y default-jdk

#RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
#RUN apt-get install oracle-java8-installer -y
#RUN apt-get install oracle-java8-set-default

RUN apt-get install -y nodejs
RUN apt-get install -y npm
RUN ln -s /usr/bin/nodejs /usr/bin/node

RUN update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install -g grunt-cli
RUN npm install
# Bundle app source
COPY . /usr/src/app

RUN grunt apidoc

EXPOSE 8080 3322

CMD ["npm", "start"]

And there are errors.

pokemongo-api@0.0.1 start /usr/src/app
NODE_ENV=production node app.js

/usr/src/app/app/services/logger.js:4
let log = function(type, message, description) {
SyntaxError: Unexpected strict mode reserved word
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/src/app/constants.js:10:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

I found that this could be due to the change in the first line from FROM node:4.0 to FROM ubuntu:14.04. However, neither of them work.

Any pointers ?

jonas-he commented 7 years ago

@swathi-ssunder i guess the version of node in the repository you installed from is so old that it doesnt support strict mode. I will look into this.

jonas-he commented 7 years ago

created PR, lets see if it works

jonas-he commented 7 years ago

build was successful 👍