diff --git a/.github/workflows/container-deploy.yml b/.github/workflows/container-deploy.yml index 06c1d6b..67ac23e 100644 --- a/.github/workflows/container-deploy.yml +++ b/.github/workflows/container-deploy.yml @@ -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 }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 23e417b..0c26502 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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 }} diff --git a/Makefile b/Makefile index a386830..5154ef0 100644 --- a/Makefile +++ b/Makefile @@ -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 # #----------------# @@ -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 # #---------# @@ -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 diff --git a/docker/prod.yml b/docker/prod.yml index 2fe3bed..8a7d3c6 100644 --- a/docker/prod.yml +++ b/docker/prod.yml @@ -1 +1,5 @@ version: "3.9" +services: + ann: + volumes: + - /mnt/storage/ann_data:/opt/ann/data