- Python Version: v3.6.4
- Pipenv Version: latest
- ageitgey/face_recognition P.S. Remember to install dlib
- Camera for Client
- Please set the server/client as the project root directory in the IDE/deployment environment.
Enter the server
or client
folder to run below commands to installing the dependency for each part.
# Please ENUSRE python3-dev had been installed
# install the virtual enviroment with dependency from Pipfile*
# dlib a C++ lib, a face_recognition requried lib, need a long time to compile
pipenv install
# check th dependency in Pipfile
pipenv graph
# enter virtual environment
pipenv shell
- Start a mongodb locally
- Start a Redis locally
- Update the config for each part. (the
local
section on config.ini, etc.)
Run below commands.
pipenv shell
# for windows, default env is DEV, all server point to Hyman's
set env=local
# for Unix-like, default env is DEV, all server point to Hyman's
export env=local
python client.py
- Update
/etc/hosts
in Unix-Like or%systemdrive%\Windows\System32\drivers\etc
in Windows to append below record. (Services' names mapping in the docker-compose.yml, for unifying the server config)
<mongo_service_ip> face_rec_mongo
<redis_service_ip> face_rec_redis
<server_service_ip> face_rec_server
Refer to #Development
Refer to the snack_bar/.gitlab-ci.yml
, using Docker
to standarize the deployment flow and environment.
Dockerfile-base
for building docker image with fixed dependency, such asface_recognition
,dlib
Dockerfile-server
for building server app docker imagedocker-compose.yml
for composing the services
- Execute
coverage run test.py
in foldersnack_bar/client/
to run all tests for client. - There will be a file
.coverage
generated to theclient/
, executeconverage report
to check the coverage.
TBC
TBC