Skip to content

Commit

Permalink
Merge pull request #15 from unicef/198763-create-ML-model
Browse files Browse the repository at this point in the history
198763 create ml model
  • Loading branch information
saxix authored May 21, 2024
2 parents 2bb4a94 + f3fe62e commit d9bcd93
Show file tree
Hide file tree
Showing 34 changed files with 1,082 additions and 76 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
!.flake8
~*
db
docs
docs
dataset
cv2dnn
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ jobs:
run: |
docker run --rm -i \
${{ vars.DOCKERHUB_ORGANIZATION }}/hope-support-images:deduplication-engine-${{ github.sha }}-dev \
flake8 .
flake8 \
--max-complexity 12 \
--max-line-length 120 \
--exclude=.*/,__pycache__,docs,~build,dist,*.md \
--per-file-ignores='src/**/migrations/*.py:E501' \
.
unit_tests:
runs-on: ubuntu-latest
needs: [build_and_push_dev]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Makefile
site
black.txt
flake8
.env
.env
2 changes: 2 additions & 0 deletions bandit.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
exclude_dirs: ['tests',]
#tests = ["B201", "B301"]
#skips = ["B101", "B601"]
skips: ["B403", "B301"]

31 changes: 13 additions & 18 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ x-common: &common
- .env
volumes:
- .:/code
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
depends_on:
db:
Expand All @@ -17,9 +18,11 @@ x-common: &common
services:
backend:
<<: *common
ports:
- 8000:8000
command: ["entrypoint.sh", "dev"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
test: ["CMD", "curl", "-f", "http://localhost:8000/healthcheck"]
interval: 10s
timeout: 5s
retries: 5
Expand Down Expand Up @@ -51,22 +54,6 @@ services:
timeout: 4s
retries: 5

hopedb:
image: postgis/postgis:15-3.4
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=hopedb
volumes:
- hope_postgres_data:/var/lib/postgresql/data/
restart: always
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
start_period: 5s
interval: 5s
timeout: 4s
retries: 5

redis:
image: redis:7.2
ports:
Expand All @@ -80,6 +67,14 @@ services:
timeout: 4s
retries: 5

azurite:
image: mcr.microsoft.com/azure-storage/azurite
command: "azurite -l /workspace -d /workspace/debug.log --blobPort 10000 --blobHost 0.0.0.0 --loose"
ports:
- "10000:10000" # Blob service
volumes:
- azurite_data:/workspace

volumes:
postgres_data:
hope_postgres_data:
azurite_data:
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN ln -s -f /bin/true /usr/bin/chfn \
&& adduser --disabled-login --disabled-password --no-create-home --ingroup hope -q www

FROM common-env AS common-os
ENV buildDeps="build-essential gcc libjpeg-dev zlib1g-dev libffi-dev libssl-dev libpq-dev "
ENV buildDeps="build-essential gcc cmake curl libjpeg-dev zlib1g-dev libffi-dev libssl-dev libpq-dev libgdal-dev libgl1-mesa-glx docker.io "
ENV runtimeDeps="postgresql-client libmagic1"
RUN rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
Expand Down
3 changes: 3 additions & 0 deletions ops/compose.ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ services:
- AZURE_CLIENT_KEY=
ports:
- 8000:8000
volumes:
- .:/code
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
db:
condition: service_healthy
Expand Down
Loading

0 comments on commit d9bcd93

Please sign in to comment.