Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 2.31 KB

Setup.md

File metadata and controls

78 lines (59 loc) · 2.31 KB

Getting Started

Author: Pradyumna Krishna
UPDATED: 23/03/2021


Initally, when I made this web application, I used virtualenv in python to debug and run the flask. But as the time passes away, I learned Docker and today there are two ways to set this application up. Lets talk about both of them:

Docker

I created and pushed the Docker Images of my web application to DockerHub and you can get it from Github Packages also.

Run Web Application*

  1. Pull the Docker Image:

    docker pull ghcr.io/pradyumnakrishna/facial-ai
    
    OR
    
    docker pull ipradyumna/facial-ai
  2. Run the Docker image:

    docker run -p 8000:5000 facial-ai

    here, 8000 is your localhost port and 5000 is the container port.

  3. Visit https://127.0.0.1:8000, where you find the web applicaiton running.

* Here you don't have to clone the repository

To Build the Docker Image

  1. Clone the Repository
    git clone https://github.com/PradyumnaKrishna/Facial-AI
  2. Build the Docker Image
    docker build -t facial-ai .
    Here, provided Dockerfile which consist the config to build the docker image, If you have arm64 architecture then this Dockerfile will not work becuase tensorflow doesn't have a arm64 image.
  3. Now you can run the Docker Image using step 2 from above tutorial.

This tutorial will work to run the web applicaiton using Docker.

Python Virtualenv

I recommend using Docker method

  1. Clone the repository
    git clone https://github.com/PradyumnaKrishna/Facial-AI
  2. Create and Activate Virtual Environment (optional)
    pip3 install virtualenv
    virtualenv env
    source ./env/bin/activate
  3. Install Dependencies
    pip3 install -r requirements.txt 
    # use this command inside repository folder
  4. Run the flask server
    python3 main.py
  5. Visit https://127.0.0.1:8000, where you find the web applicaiton running.

That's all the information about how to setup this web application on your computer.

Back: Getting Started
Next: API Refernce