Giter VIP home page Giter VIP logo

covidex's Introduction

COVID-19 Open Research Dataset Search

Build Status LICENSE

This repository contains the API server, neural models, and UI client for Covidex, a neural search engine for the COVID-19 Open Research Dataset (CORD-19).

Local Deployment

API Server

Install CUDA 10.1

  • For Ubuntu, follow these instructions
  • For Debian run sudo apt-get install nvidia-cuda-toolkit

Install Anaconda (currently version 2020.02)

wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
bash Anaconda3-2020.02-Linux-x86_64.sh

Install Java 11

sudo apt-get install openjdk-11-jre openjdk-11-jdk

Build the latest Anserini indices

sh scripts/update-anserini-index.sh

Build the latest HNSW index for related article search

sh scripts/update-hnsw-index.sh

Set up environment variables by copying over the defaults and modifying as needed

cp api/.env.sample api/.env

Create an Anaconda environment for Python 3.7

conda create -n covidex python=3.7

Activate the Anaconda environment

conda activate covidex

Install Python dependencies

pip install -r api/requirements.txt

Run the server (make sure you are in the api/ folder)

uvicorn app.main:app --reload --port=8000

The server wil be running at localhost:8000 with API documentation at /docs

UI Client

Install Node.js 12+ and Yarn.

Install dependencies

yarn install

Start the server

yarn start

The client will be running at localhost:3000

Production Deployment

Redirect port 80 to specified port since only root can bind to port 80 (the below command uses port 8000):

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000

Build the latest Anserini indices

sh scripts/update-anserini-index.sh [DATE]

Build the latest HNSW index for related article search

sh scripts/update-hnsw-index.sh

Start the server (deploys to port 8000 by default):

sh scripts/deploy-prod.sh

Optional: set the environment variable $PORT:

PORT=8000 sh scripts/deploy-prod.sh

Log files are available under api/logs, where new files are created daily based on UTC time. All filenames have the date appended except for the current one, which will be named search.log or related.log.

Testing

To run all API tests

TESTING=true pytest api

covidex's People

Contributors

daemon avatar dependabot[bot] avatar edwinzhng avatar lintool avatar nikhilro avatar rodrigonogueira4 avatar ronakice avatar x65han avatar

Watchers

 avatar

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.