Giter Club home page Giter Club logo

sake's Introduction

SAKE

Server side code

Deploying a Flask app to the gcloud server

(adapted from http://csparpa.github.io/blog/2013/03/how-to-deploy-flask-applications-to-apache-webserver.html)

Change user to root (or sudo all the following commands)

sudo su

Change to app directory

cd /opt/bitnami/apps/flask

Create a folder for your app

mkdir foldername

Add your app (py and wsgi file, see test app for example)

#test.py
from flask import Flask, request
app = Flask(__name__)

@app.route('/hello')
def hello_world():
  name = request.args.get('name','')
  return 'Hello ' + name + '!'

if __name__ == '__main__':
  app.run()
#test.wsgi
import sys

#Expand Python classes path with your app's path
sys.path.insert(0, "/opt/bitnami/apps/flask/test")

from test import app
application = app

Edit the bottom of the httpd.conf configuration file to give access permission to your directory and point your url

vim /opt/bitnami/apache2/conf/httpd.conf
<Directory /opt/bitnami/apps/flask/test>
  Require all granted
</Directory>
WSGIScriptAlias /flasktest /opt/bitnami/apps/flask/test/test.wsgi

Restart the Apache server

/opt/bitnami/ctlscript.sh restart apache

Useful Commands

To refresh cache after updating Flask app

rm *pyc; /opt/bitnami/ctlscript.sh restart apache

To tail server logs (requests and python print statements)

tail -f /opt/bitnami/apache2/logs/*log

sake's People

Contributors

ericwu09 avatar span314 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sake's Issues

Setting up SAKE and running as a demo

I really like the SAKE project. The set up instructions for getting going with example data does not seem to be available. Are you able to provide some guidelines on how to do this? Thank you

Complete code

I'm interested in the ML pipeline using OHIF and would like to look at the complete code to see how it is put together. I can see the server side code (SAKE) and the original Viewer code but how does this link to your new function OHIF viewer? For example, how did you add the Segment to the toolbar and get t to integrate the ML pipeline with the original OHIF viewer code?

I'm new to Flask etc so please bear with me with your reply so I can keep up.

Thanks
David

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.