Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
ci: add auto download of Efficientnet files (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Cervello committed Jan 12, 2022
1 parent 0230d0d commit 8368404
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
matrix:
env:
- ${{ startsWith(github.ref, 'refs/tags/v') && 'robotoff-ann-org' || 'robotoff-ann-net' }}
environment: ${{ matrix.env }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,3 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ hello:
goodbye:
@echo "🥫 Cleaning up dev environment (remove containers, remove local folder binds, prune Docker system) …"

dev: hello init_data up

#----------------#
# Docker Compose #
#----------------#
Expand Down Expand Up @@ -85,6 +87,18 @@ tests: up_tests _tests down_tests

quality: up_tests _lint _checks _tests down_tests

#------#
# Data #
#------#
init_data:
@echo "🥫 Downloading efficientnet tar (60GB) ..."
@curl --output efficientnet.tar.gz -m 1800 -C - https://static.openfoodfacts.org/data/efficientnet.tar.gz
tar -xf efficientnet.tar.gz -C ann_data/ --strip-component=1

clean_data:
rm efficientnet.tar.gz
rm -r ann_data/*

#---------#
# Cleanup #
#---------#
Expand All @@ -96,4 +110,4 @@ prune_cache:
@echo "🥫 Pruning Docker builder cache …"
docker builder prune -f

clean: goodbye hdown prune prune_cache
clean: goodbye hdown prune prune_cache clean_data
4 changes: 4 additions & 0 deletions docker/prod.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
version: "3.9"
services:
ann:
volumes:
- /mnt/storage/ann_data:/opt/ann/data

0 comments on commit 8368404

Please sign in to comment.