Skip to content

Installation

(Bill) Yuchen Lin edited this page Jul 27, 2019 · 11 revisions

Dependencies

Setup Python environment

First we need to install the dependencies. Run the following commands:

git clone https://github.com/INK-USC/AlpacaTag.git
cd AlpacaTag
conda create -n alpaca python==3.6.5
conda activate alpaca
pip install -r requirements.txt
python -m spacy download en

Setup the model server

Alpaca Server Installation

AlpacaTag:
  - alpaca_client
  + alpaca_server:
     - alpaca_model
     - alpaca_serving
  - annotation

move into alpaca_server directory and enter the command:

python -m pip install .

Alpaca Client Installation

AlpacaTag:
  + alpaca_client:
      - __init__.py
      - setup.py
  - alpaca_server
  - annotation

move into alpaca_client directory and enter the command:

python -m pip install .

Setup the annotation server

We need to compile the front-end. Run the following commands:

cd annotation/AlpacaTag/server
# npm install -g npm  # To install the newest version.
npm install
npm run build
cd ..

Next we need to make migration. Run the following command:

python manage.py migrate

Next we need to create a user who can login to the admin site. Run the following command:

python manage.py createsuperuser

Enter the admin username and email address and the password and press enter.

Username: admin
Email address: admin@example.com
Password: **********
Password (again): *********
Superuser created successfully.

Start Annotation Server

python manage.py runserver 0.0.0.0:8000

Please follow the annotation documentation to continue the tutorial.