Instalasi Eval AI di Ubuntu 17.10

Artikel ini adalah adaptasi dari prosedur instalasi di https://github.com/Cloud-CV/EvalAI

 

apt-get install openssh-server
apt-get install net-tools

Instalasi software dependencies:

apt-get install python2.7
apt-get install git
apt-get install postgresql

# Success. You can now start the database server using:
# /usr/lib/postgresql/9.6/bin/pg_ctl -D /var/lib/postgresql/9.6/main -l logfile start

apt-get install rabbitmq-server
apt-get install virtualenv
apt-get install python-psycopg2 (thanks to https://stackoverflow.com/questions/28253681/you-need-to-install-postgresql-server-dev-x-y-for-building-a-server-side-extensi)
apt-get install libpq-dev
apt-get install python-dev
apt-get install build-essential

# clone the EvalAI code

git clone https://github.com/Cloud-CV/EvalAI.git evalai

# Create a python virtual environment and install python dependencies.

cd evalai
virtualenv venv
source venv/bin/activate # run this command everytime before working on project
pip install -r requirements/dev.txt

Proses sampai tahap ini berhasil, selanjutnya masih perlu diujicoba:

cp settings/dev.sample.py settings/dev.py

Use your postgres username and password for fields USER and PASSWORD in dev.py file.

Create an empty postgres database and run database migration.

sudo -i -u (username)
createdb evalai
python manage.py migrate –settings=settings.dev

Seed the database with some fake data to work with.

python manage.py seed –settings=settings.dev

This command also creates a superuser(admin), a host user and a participant user with following credentials.

SUPERUSER- username: admin password: password
HOST USER- username: host password: password
PARTICIPANT USER- username: participant password: password

That’s it. Now you can run development server at http://127.0.0.1:8000 (for serving backend)

python manage.py runserver –settings=settings.dev

Open a new terminal window with node(6.9.2) and ruby(gem) installed on your machine and type

npm install

Install bower(1.8.0) globally by running:

npm install -g bower

Now install the bower dependencies by running:

bower install

If you running npm install behind a proxy server, use

npm config set proxy http://proxy:port

Now to connect to dev server at http://127.0.0.1:8888 (for serving frontend)

gulp dev:runserver

That’s it, Open web browser and hit the url http://127.0.0.1:8888.

(Optional) If you want to see the whole game into play, then start the RabbitMQ worker in a new terminal window using the following command that consumes the submissions done for every challenge:

python scripts/workers/submission_worker.py