Skip to content

PennyQ/deepgalaxydemo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy deepgalaxy project with Django

This project is a Django web applicationn for DeepGalaxy project, consists of several main components:

This application is (going to be) hosted in one of the main cloud provider, in order to provide public access.

The code structure

In the research directory there are:

  • code for training machine learning models (TBD).

In the backend directory there is Django application. Under /apps there are:

  • endpoints: Django Rest application

  • ml: deepgalaxy model code and training dataset

In the docker directory there are dockerfiles for running the service in the container.

How to use

  • Install dependencies from requirements.txt

  • To clean historic data, you can

    >>> rm db.sqlite3
    >>> python manage.py makemigrations
    >>> python manage.py migrate
    
  • To run the server, you can

    python manage.py runserver

    Open your browser and go to 0.0.0.0:8000/post/ to start, have fun! ;)

  • To test the code and endpoint (TBD)

    >>> python manage.py test apps.ml.tests
    >>> python manage.py test apps.endpoints.tests
    >>> python manage.py test apps
    

Containerization

The docker compose file consists of two services:

  • Nginx: our web server and reverse proxy. Where requests from the internet arrive first and get handled quickly.
  • WSGI server: uses Gunicorn, a production-grade WSGI server. Worker that actually calls Python code when a request comes in.
>>> docker-compose down -v
>>> docker-compose up --build

About

My Machine Learning Web Service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.5%
  • Jupyter Notebook 19.8%
  • Other 1.7%