Skip to content

Commit

Permalink
issue #60: Merge branch 'main' into 60-pipeline-version-insertion-module
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxenceGui committed Apr 10, 2024
2 parents 9cf2d57 + 918cd38 commit b4c40dc
Show file tree
Hide file tree
Showing 24 changed files with 1,271 additions and 488 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"features": {},
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
9 changes: 3 additions & 6 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
NACHET_AZURE_STORAGE_CONNECTION_STRING=

NACHET_DATA=
NACHET_SUBSCRIPTION_ID=
NACHET_RESOURCE_GROUP=
NACHET_WORKSPACE=
NACHET_MODEL=

NACHET_BLOB_PIPELINE_NAME=
NACHET_BLOB_PIPELINE_VERSION=
NACHET_BLOB_PIPELINE_DECRYPTION_KEY=
NACHET_MAX_CONTENT_LENGTH=
NACHET_VALID_EXTENSION=
NACHET_VALID_DIMENSION=
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This CODEOWNERS file is auto-generated. See the script at <https://github.com/ai-cfia/devops/blob/main/github-management-script/codeowners-file-creation.sh> for modification details.

* @ai-cfia/backend
* @ai-cfia/nachet
/.github/ @ai-cfia/devops
Dockerfile @ai-cfia/devops
docker-compose.yml @ai-cfia/devops
docker-compose.*.yml @ai-cfia/devops
36 changes: 32 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
# nachet-backend
# :microscope: nachet-backend 🌱

## High level sequence diagram

![SD_1 drawio (2)](https://github.com/ai-cfia/nachet-backend/assets/19809069/272f37dc-f4ec-449b-ba82-950c54b9f856)
```mermaid
sequenceDiagram
title: High Level Sequence Diagram 1.0.0
actor Client
participant frontend
participant backend
participant EndpointAPI
participant AzureStorageAPI
Client->>+frontend: getDirectoriesList()
frontend->>+backend: HTTP POST req.
backend->>+AzureStorageAPI: get_blobs()
AzureStorageAPI-->>-backend: blobListObject
backend-->>frontend: directories list res.
frontend-->>Client: display directories
Client->>frontend: handleInference()
frontend->>backend: HTTP POST req.
backend->>+AzureStorageAPI: upload_image(image)
AzureStorageAPI-->>-backend: imageBlobObject
backend->>+EndpointAPI: get_inference_result(image)
EndpointAPI-->>-backend: inference res.
backend->>backend: process inf. result
backend-->>frontend: inference res.
frontend-->>-Client: display inference res.
backend->>+AzureStorageAPI: (async) upload_inference_result(json)
```

### Details

Expand Down Expand Up @@ -40,8 +66,6 @@ To test the program, use this command:
python -m unittest discover -s tests
```

****

### ENVIRONMENT VARIABLES

Start by making a copy of `.env.template` and renaming it `.env`. For the
Expand All @@ -55,6 +79,10 @@ backend to function, you will need to add the missing values:
pipeline used.
- **NACHET_BLOB_PIPELINE_DECRYPTION_KEY**: The key to decrypt sensible data from
the models.
- **NACHET_VALID_EXTENSION**: Contains the valid image extensions that are
accepted by the backend
- **NACHET_VALID_DIMENSION**: Contains the valid dimensions for an image to be
accepted in the backend.

#### DEPRECATED

Expand Down
Loading

0 comments on commit b4c40dc

Please sign in to comment.