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:
I created and pushed the Docker Images of my web application to DockerHub and you can get it from Github Packages also.
-
Pull the Docker Image:
docker pull ghcr.io/pradyumnakrishna/facial-ai OR docker pull ipradyumna/facial-ai
-
Run the Docker image:
docker run -p 8000:5000 facial-ai
here,
8000
is yourlocalhost
port and5000
is thecontainer
port. -
Visit
https://127.0.0.1:8000
, where you find the web applicaiton running.
* Here you don't have to clone the repository
- Clone the Repository
git clone https://github.com/PradyumnaKrishna/Facial-AI
- Build the Docker Image
Here, provided
docker build -t facial-ai .
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. - Now you can run the Docker Image using step 2 from above tutorial.
This tutorial will work to run the web applicaiton using Docker.
I recommend using Docker method
- Clone the repository
git clone https://github.com/PradyumnaKrishna/Facial-AI
- Create and Activate Virtual Environment (optional)
pip3 install virtualenv virtualenv env source ./env/bin/activate
- Install Dependencies
pip3 install -r requirements.txt # use this command inside repository folder
- Run the flask server
python3 main.py
- 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