Skip to content

Commit

Permalink
Merge pull request cesium-ml#159 from bnaul/install_instructions
Browse files Browse the repository at this point in the history
Update install instructions
  • Loading branch information
stefanv authored Feb 23, 2017
2 parents b0e4a73 + 5f06aa5 commit c1b6e38
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
1 change: 1 addition & 0 deletions .travis/travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ section_end "install.base.requirements"


section "install.cesium.requirements"
pip install -e git://github.com/cesium-ml/cesium.git#egg=cesium
pip install --retries 3 -r requirements.txt
pip list
section_end "install.cesium.requirements"
Expand Down
54 changes: 23 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/cesium-ml/cesium_web.svg?branch=master)](https://travis-ci.org/cesium-ml/cesium_web)

## About
## About

Web frontend for the [`cesium` library](https://github.com/cesium-ml/cesium). Within the browser, users can upload time series data data, extract features, fit a model, and generate predictions for new data.

Expand All @@ -25,36 +25,26 @@ The easiest way to try the web app is to run it through Docker:
```

## Running the app locally
1. Install the following dependencies:

- supervisor
- nginx
- postgresql (including libpq-dev on Debian)
- npm

### MacOS
Using [Homebrew](http://brew.sh/):

`brew install supervisor nginx postregsql node`

### Linux
On Debian or Ubuntu:
```
sudo apt-get install nginx supervisor postgresql libpq-dev npm nodejs-legacy
```

2. Install Python dependencies: `pip install -r requirements.txt`
3. On Linux, it may be necessary to configure your database permissions: at the end of your `pg_hba.conf` (typically in `/etc/postgresql/9.5/main`), add the following lines:

```
local all postgres peer
local cesium cesium trust
local cesium_test cesium trust
```
and restart `postgresl` (`sudo service postgresql restart`).

4. Initialize the database with `make db_init`
5. Run `make` to start the server and install additional dependencies, and navigate to `localhost:5000`.
1. Install the following dependencies: Supervisor, NGINX, PostgreSQL, Node.JS.
1. On macOS:
1. Using [Homebrew](http://brew.sh/): `brew install supervisor nginx postgresql node`
2. Start the postgresql server:
- to start automatically at login: `brew services start postgresql`
- to start manually: `pg_ctl -D /usr/local/var/postgres start`
2. On Linux:
1. Using `apt-get`: `sudo apt-get install nginx supervisor postgresql libpq-dev npm nodejs-legacy`
2. It may be necessary to configure your database permissions: at the end of your `pg_hba.conf` (typically in `/etc/postgresql/9.5/main`), add the following lines:

```
local all postgres peer
local cesium cesium trust
local cesium_test cesium trust
```
and restart `postgresl` (`sudo service postgresql restart`).
2. Install Python and JavaScript dependencies with `make_dependencies`
3. Initialize the database with `make db_init`
4. Run `make` to start the server and navigate to `localhost:5000`
## Dev Tips
To execute the test suite:
Expand All @@ -72,6 +62,8 @@ Debugging:
- Run `make debug` to start webserver in debug mode
- Run `make attach` to attach to output of webserver, e.g. for use with `pdb.set_trace()`
NOTE: Requires Python 3.5 or later.
## Standards
To ensure that JavaScript & JSX code conforms with industry style
recommendations, after adding or modifying any .js or .jsx files, run ESLint with
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-e git://github.com/cesium-ml/cesium.git#egg=cesium
cesium>=0.8.0
netCDF4
peewee>=2.8.3
psycopg2
Expand Down
5 changes: 2 additions & 3 deletions tools/install_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
except ImportError:
print(("Development dependency '{}' unfulfilled. "
"Installing requirements.").format(dep))
subprocess.call("pip install -r {}".format(req_file).split())
sys.exit(0)

p = subprocess.call("pip install -r {}".format(req_file).split())
sys.exit(p)
print('Dependencies from {} verified.'.format(req_file))

0 comments on commit c1b6e38

Please sign in to comment.