https://github.com/cltk/cltk_api_v2
https://github.com/cltk/cltk_api_v2
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cltk/cltk_api_v2
- Owner: cltk
- License: mit
- Created: 2016-11-05T15:19:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T19:51:06.000Z (over 8 years ago)
- Last Synced: 2025-02-17T08:41:44.986Z (over 1 year ago)
- Language: Python
- Size: 98.6 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
This is the CLTK's API, including the code, Dockerfile, and deployment script for Google Cloud Platform.
To develop and run this app and run on GCP:
1. If you're only testing the Flask app, just serve with `python app/app.py`. Check with `curl 0.0.0.0:5000`.
1. [Install Docker](https://www.docker.com/) on your local machine.
1. Run `gcp.sh build` to test that everything works fine. `curl localhost` will give you a 200 response.
1. Install the [GCP commandline tools](https://cloud.google.com/sdk/docs/#install_the_latest_cloud_tools_version_cloudsdk_current_version).
1. Initialize gcloud settings with `gcloud init`.
1. Edit the variables at the top of `gcp.sh` if you need.
1. Run `gcp.sh deploy`. This will take about 5 minutes (including time both to push files to the server, and for Google to launch and assign an external IP) and at the end you'll be given an external IP to go to. This should also give a 200 response.
1. To update an already-deployed service, increment `DOCKER_BUILD_VERSION` and run `./gcp.sh build` and then `./gcp.sh update`.
1. To completely teardown your remote deployment, run `gcp.sh destroy`.