YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π¦βπ₯ Project: UNILEVER_Master β main Branch
HuggingFace Repo: https://huggingface.co/HawkEyesAI/UBL-Backup
π³ Run with Docker (recommended)
Builds and runs on any machine with Docker Desktop β no GPU, no manual Python/apt setup. On a host with an NVIDIA GPU it also picks up CUDA automatically via the GPU override below.
One-time setup:
git lfs pull # pulls projectUNILEVER/AI_Models/*.pt (1.7GB)
cp .env.example .env # optional β only needed to override defaults
Build and run:
# Any machine (CPU):
docker compose up -d --build
# Host with an NVIDIA GPU + NVIDIA Container Toolkit installed:
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d --build
Confirm it's alive:
curl http://localhost:5656/status
Logs:
docker compose logs -f
(App-level rotating logs also land in ./logs/ on the host β bind-mounted,
same files the app itself writes via projectUNILEVER/tools/logging_setup.py.)
Lint the Dockerfile/compose file and run a full build+health smoke test:
bash scripts/lint-docker.sh
bash scripts/docker-smoke-test.sh
Stop:
docker compose down
Publish to Docker Hub:
export IMAGE_NAME=yourdockerhubuser/ubl-api
export IMAGE_TAG=1.0.0
docker login
docker compose build
docker compose push
The image bakes in the full application source (COPY . . in the
Dockerfile) β keep the Docker Hub repo private unless this code is
meant to be public. AI model weights are never baked in (git-lfs, bind-mounted
at runtime) β whoever pulls the image separately needs their own
git lfs pull of projectUNILEVER/AI_Models/.
Single heavy inference process (10 YOLO models + facenet loaded into
memory/GPU) β scale by running more containers behind a load balancer, not
--scale/multiple uvicorn workers in one container, which would multiply
memory for no throughput gain.
See Dockerfile, docker-compose.yml,
and docker-compose.gpu.yml for details.
π₯οΈ Bare-metal Deployment (legacy)
The commands below run the app directly on the host (via tmux + ngrok)
instead of in a container β kept for hosts that still use this flow.
π Full Deployment Command
sudo apt update && sudo apt upgrade -y \
&& sudo apt-get install -y iproute2 libgl1 nano wget unzip nvtop git git-lfs \
&& git config --global credential.helper store \
&& git clone -b main https://huggingface.co/HawkEyesAI/UBL-Backup \
&& cd UNILEVER_Master \
&& chmod +x deploy.sh \
&& ./deploy.sh \
&& python test.py \
&& python countError.py
π§ͺ Manual Setup & API Run
git clone -b main https://huggingface.co/HawkEyesAI/UBL-Backup
cd UNILEVER_Master
pip install -r requirements.txt
sudo apt update && sudo apt upgrade -y
python UBL_API.py
π Expose API via ngrok
tmux new-window -t deploy "ngrok http --domain=he.ngrok.app 5656"
tmux new-window -t deploy "ngrok http --domain=hawkeyes.ngrok.app 5656"
Direct command:
ngrok http --domain=he.ngrok.app 5656
ngrok http --domain=hawkeyes.ngrok.app 5656
β‘ Run with Hypercorn
tmux new-session -d -s deploy "python UBL_API.py"
or
tmux new-session -d -s deploy "hypercorn UBL_API:app --bind 127.0.0.1:5656 --workers 2"
π Citation
@misc{hawkeyes_digital_monitoring_ltd_2025,
author = { HawkEyes Digital Monitoring Ltd },
title = { UNILEVER_Master (Revision 6cbf0b8) },
year = 2025,
url = { https://huggingface.co/HawkEyesAI/UNILEVER_Master },
doi = { 10.57967/hf/7061 },
publisher = { Hugging Face }
}