Skip to content

Commit

Permalink
chore: add command to download nutrition extractor model
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Oct 24, 2024
1 parent 9ef3b7a commit dbe4577
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# nice way to have our .env in environment for use in makefile
# see https://lithic.tech/blog/2020-05/makefile-dot-env
# Note: this will mask environment variable as opposed to docker-compose priority
# yet most developper should'nt bump into this
# yet most developper shouldn't bump into this
ifneq (,$(wildcard ./.env))
-include .env
-include .envrc
Expand Down Expand Up @@ -161,6 +161,13 @@ dl-image-clf-models:
wget -cO - https://huggingface.co/openfoodfacts/$${asset_name}/resolve/main/weights/best.onnx > $${dir}/model.onnx; \
done;


dl-nutrition-extractor-model:
@echo "⏬ Downloading nutrition extractor model files …"
${DOCKER_COMPOSE} run --rm --no-deps api huggingface-cli download openfoodfacts/nutrition-extractor --include 'onnx/*' --local-dir models/triton/nutrition_extractor/1/; \
cd models/triton/nutrition_extractor/1/; \
mv onnx model.onnx;

init-elasticsearch:
@echo "Initializing elasticsearch indices"
${DOCKER_COMPOSE} up -d elasticsearch 2>&1
Expand Down

0 comments on commit dbe4577

Please sign in to comment.