Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project TS #38

Open
wants to merge 314 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
25eb505
Mosaic is now a timeframe level attr
ingalls Jan 18, 2023
03e1d3a
Merge pull request #40 from developmentseed/develop
batpad Jan 19, 2023
08d1c82
Fix merge conflicts
ingalls Jan 19, 2023
7c9f228
Get flow tests updated to expected props
ingalls Jan 19, 2023
645b5cd
Fix util exports
ingalls Jan 19, 2023
e0602a7
Update Schema Document for flow runner
ingalls Jan 19, 2023
ab502b5
Fix flow interface
ingalls Jan 19, 2023
beeefcb
Fix TimeFrame init in GPU
ingalls Jan 19, 2023
c9d2e89
Update Instance to use timeframe_id
ingalls Jan 19, 2023
53f3202
Fully Migrate ModelSrv to TimeFrame class
ingalls Jan 19, 2023
c29fa86
Update WS Messages
ingalls Jan 19, 2023
44c1c63
Setup AOIs in init.js & update model#prediction payload
ingalls Jan 19, 2023
4e20e3e
Load AOI information on receipt of prediction message
ingalls Jan 19, 2023
3ec42fc
Merge pull request #41 from developmentseed/develop
geohacker Jan 20, 2023
02e6262
Update API Docs
ingalls Jan 20, 2023
7ccde2c
Ensure APIDoc picks up websockets
ingalls Jan 20, 2023
df350bf
Continue to fix processing errors
ingalls Jan 20, 2023
ae86df4
Submit mosaic in timeframe reqest
ingalls Jan 20, 2023
eb7bb57
Get a prediction starting
ingalls Jan 20, 2023
efd2306
Create routes for accessing TimeFrame without knowning project/aoi
ingalls Jan 20, 2023
32d3787
Continue to iterate on expected props
ingalls Jan 20, 2023
aa47058
Get predictions working
ingalls Jan 23, 2023
cee2324
Fix prediction complete id
ingalls Jan 24, 2023
c85a881
Continue fixing GPU ops
ingalls Jan 24, 2023
1fe9f0a
More GPU fix
ingalls Jan 24, 2023
421c777
Retrain progress bars and a few more bug fixes
ingalls Jan 24, 2023
deb0f08
add consoles to see what's wrong with auth
geohacker Jan 30, 2023
d5dfd24
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
geohacker Jan 30, 2023
bfbe7c1
remove consoles
geohacker Jan 30, 2023
2ebea3e
update auth0 docs
geohacker Jan 30, 2023
021b06c
Merge pull request #42 from developmentseed/debug-auth
geohacker Jan 30, 2023
a5bd6e7
return res
geohacker Jan 30, 2023
f3cc031
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
geohacker Jan 30, 2023
22c511c
catch user auth related errors. use req.auth instead of req.user beca…
geohacker Jan 30, 2023
e717241
Merge branch 'main' of github.com:developmentseed/pearl-backend into …
ingalls Feb 6, 2023
1956a62
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
ingalls Feb 6, 2023
3548172
Add Mosaic Group
ingalls Feb 6, 2023
6f55d1a
Add Mosaic Type
ingalls Feb 6, 2023
aae283e
Add Mosaic Groups
ingalls Feb 6, 2023
4cfb9bf
Add ModelSessionUnet3 for sentinel trained model
Feb 7, 2023
12230a6
Migrate to ImagerySources
ingalls Feb 7, 2023
70eb987
Get tests passing
ingalls Feb 7, 2023
7266b46
Try sleeping for now
ingalls Feb 7, 2023
1f41d30
Print API Logs
ingalls Feb 7, 2023
56f9d4b
merge project-ts
geohacker Feb 8, 2023
dfcdb5c
add dependency for albumentation
Feb 8, 2023
b2c5e08
helper for creating custom mosaics
geohacker Feb 8, 2023
6eac265
Update Mosaic
ingalls Feb 8, 2023
730c053
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
ingalls Feb 8, 2023
ac0d97f
Add mosaic_ts_start/end & add Sentinel-2 Category
ingalls Feb 8, 2023
04620e8
Add insertions & update testsg
ingalls Feb 8, 2023
ad6909b
Add Imagery Source IDs
ingalls Feb 9, 2023
63991dc
Update mosaics
ingalls Feb 9, 2023
3c6f250
Imagery Source ID
ingalls Feb 9, 2023
2c99fad
Add bounds info
ingalls Feb 9, 2023
a9824f4
Fix Lint
ingalls Feb 9, 2023
348c1b0
Add imagery_source_id
ingalls Feb 9, 2023
baa089e
Get project tests passing
ingalls Feb 9, 2023
28b21e1
Update tests
ingalls Feb 9, 2023
d904707
Fix checkpoint message
ingalls Feb 9, 2023
af5994b
Fix WS Docs
ingalls Feb 10, 2023
9c44f2a
Update lints
ingalls Feb 21, 2023
eca54ee
Update Mosaic endpoints to use either name or Id
ingalls Feb 21, 2023
c62d853
Add Mosaic Caching layer
ingalls Feb 21, 2023
223bb8d
Fix mosaics insertion
ingalls Feb 21, 2023
8cec002
Flow tests fix
ingalls Feb 21, 2023
0c4f1e8
Update Model Create Expec.
ingalls Feb 21, 2023
a86b04c
Fix flow tests
ingalls Feb 21, 2023
14e6466
Update Schema
ingalls Feb 21, 2023
d48b393
Fix mosaic API call
ingalls Feb 21, 2023
56804a4
Update Docker Compose to migrate before API starts
ingalls Feb 21, 2023
f265516
Set 4 channel
ingalls Feb 22, 2023
2367f67
Fix asset ID param
ingalls Feb 22, 2023
edc60a5
Add new model type class
ingalls Feb 22, 2023
c92c36d
Add Sentinel Flow tests
ingalls Feb 22, 2023
50b0c00
Update Mosaic Tests
ingalls Feb 22, 2023
7babe8a
Update unit tests
ingalls Feb 22, 2023
820349d
Add Mosaic
ingalls Feb 22, 2023
5281a74
Merge remote-tracking branch 'origin/model-integration' into project-…
ingalls Feb 22, 2023
a0961f2
Add ability to specify project
ingalls Feb 22, 2023
a1058b8
Load name or ID
ingalls Feb 23, 2023
224e597
Setup PC Tiler URL
ingalls Feb 23, 2023
48d4182
Parse Parameters
ingalls Feb 24, 2023
097fd8e
Remove debug code
ingalls Feb 24, 2023
8c23ef4
Remove transpose from inmemrater.data inside InferenceDataset
Feb 24, 2023
bfe623d
Fix TimeFrame upload
ingalls Feb 24, 2023
19292c2
Merge pull request #46 from developmentseed/project-ts-imagery
ingalls Feb 24, 2023
0498ba0
Fix moasic tests
ingalls Feb 27, 2023
4117c76
Update Mosaic Tests
ingalls Feb 27, 2023
5165035
Clear DB Mosaic table before repopulating
ingalls Feb 28, 2023
6c7c334
Passing migration file
ingalls Feb 28, 2023
26a4e2b
Setup InferenceDataLoader per model
ingalls Mar 2, 2023
0b79aba
Add ui_params
ingalls Mar 7, 2023
8c09eb5
Add UI Params
ingalls Mar 7, 2023
8bc4e65
Add ModelSession script for Sentinel DeepLabv3plus model
Mar 7, 2023
cf4c17f
add nir band to mosaic model params
geohacker Mar 8, 2023
5260e6a
Fix model weights loading for s2adeeplabv3plus after re-training
Mar 9, 2023
9848182
add rescale param to model imagery params
geohacker Mar 9, 2023
cca2b36
Fix generating embeddings per tile
Mar 9, 2023
2153c32
Add a few print statements to check help-deploy on push
Mar 10, 2023
a5d47f0
take 200 points from the retrain polygon
geohacker Mar 14, 2023
0f382db
Update License
ingalls Mar 16, 2023
7dadfee
Set Sentinel Model to 1024^2
ingalls Mar 16, 2023
c412dcb
Remove special casing and generate tile request dynamically
ingalls Mar 16, 2023
046e345
Setup Max Scale
ingalls Mar 16, 2023
79dd419
Remove Debug Code
ingalls Mar 16, 2023
5e489db
Merge pull request #48 from developmentseed/deeplab-integrate
srmsoumya Mar 20, 2023
90314b1
Merge branch 'project-ts-unlimited' into project-ts
ingalls Mar 30, 2023
79242d9
Add Generic Buffer Call
ingalls Mar 30, 2023
1e74088
Update models to work with 4 channel sentinel
ingalls Mar 31, 2023
61a1fdc
Use Headless CV2
ingalls Mar 31, 2023
68339f3
use scikit-image to resize masks instead of cv2
Mar 31, 2023
ee12a05
Remove install
ingalls Mar 31, 2023
2497488
fix unmatched ) error
Mar 31, 2023
7dad82b
Fix resize syntax
ingalls Mar 31, 2023
9b63c48
Fix merge conflicts
ingalls Mar 31, 2023
f3a7161
Fix Timeframe Fetch
ingalls Apr 4, 2023
0bd9cd6
Fix lints
ingalls Apr 4, 2023
bf11988
Fix share update
ingalls Apr 5, 2023
9f3820e
Fix TileJSON Endpoint
ingalls Apr 17, 2023
4f4f6ab
Fix tests
ingalls Apr 17, 2023
e0509ea
Fix Mosaic Tests
ingalls Apr 17, 2023
81194e5
Fix lints
ingalls Apr 17, 2023
938ca54
Migrate Batch to act like TimeFrame
ingalls Apr 21, 2023
46ffa2c
Submit Batch Properly
ingalls Apr 21, 2023
396e32a
Setup Batch
ingalls Apr 24, 2023
58bc35c
Merge pull request #60 from developmentseed/project-ts-batch
ingalls Apr 24, 2023
059edaa
modify tiles replica count through values
geohacker Apr 25, 2023
62aa850
make socket and redis not land on cpunodepool
geohacker Apr 25, 2023
c642f6a
Fix Doc Generation
ingalls Apr 27, 2023
1e7d9a5
Update Batch Tests
ingalls Apr 27, 2023
85f78d5
Add more data to Share endpoints
ingalls Apr 27, 2023
c328ff4
Update Share Tests
ingalls Apr 28, 2023
697a1b2
Add Mosaic Data
ingalls Apr 28, 2023
46b2d50
Add abort and progress to batch list
ingalls May 2, 2023
1dbb246
Fix Mosaic Join Bug
ingalls May 2, 2023
937bbf9
Update Batch Endpoints with augmented meta
ingalls May 2, 2023
d84ae1d
Continue updating batch tests
ingalls May 2, 2023
4fbe2c8
Fix Batch Tests
ingalls May 2, 2023
2fee454
Fix bug in arg parser uncovered with python 3.11
ingalls May 3, 2023
213cab1
Further fixes to arg parsing and expected batch output
ingalls May 3, 2023
3ba9bf9
Fix Share Download
ingalls May 5, 2023
a72dea3
Merge pull request #62 from developmentseed/tiles-replica
geohacker May 10, 2023
61a0d3a
increase cpu instance resource limits
geohacker May 10, 2023
aec0eaa
give more cpu and mem
geohacker May 11, 2023
bc1539c
actually not so much cpu
geohacker May 11, 2023
9da9c54
for cpu use 1 batch and 1 worker
geohacker May 11, 2023
d15e9dc
pin_memory false on cpu
geohacker May 11, 2023
2b2177b
add shm volume for cpu as well
geohacker May 11, 2023
78b211f
actually make batch size 1 for prediction
geohacker May 11, 2023
0574d8a
go back to lower cpu requests
geohacker May 12, 2023
aa38ef9
Convert to string
ingalls May 19, 2023
8ebd9e7
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
ingalls May 19, 2023
83c7e24
Update deps
ingalls May 22, 2023
e7d0ecf
Fix Typo
ingalls May 22, 2023
f365c4e
log timeframe area. read aoi inference limits from env
geohacker May 26, 2023
e61c745
expose aoi limits to helm vars
geohacker May 26, 2023
74f38be
use correct namespace for the inference envs
geohacker May 26, 2023
012a831
quote var values and then cast
geohacker May 26, 2023
55dd510
check if env is available
geohacker May 29, 2023
67a1676
fix gpu and cpu count envs from values
geohacker May 30, 2023
4c71c88
remove os flush calls
ingalls May 30, 2023
965a018
reduce cpu resources
geohacker Jun 1, 2023
4406b88
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
geohacker Jun 1, 2023
0b03563
fix cpucount var
geohacker Jun 1, 2023
810ad6f
more resources for cpu instance
geohacker Jun 1, 2023
35b7fde
Fix constraint
ingalls Jun 1, 2023
1abad5e
Merge pull request #70 from developmentseed/project-ts-fix
geohacker Jun 1, 2023
448d2d1
make instance cpu resources come from env
geohacker Jun 2, 2023
2dffaca
quote
geohacker Jun 2, 2023
311d37c
dont quote
geohacker Jun 2, 2023
67e37d8
quote the right thing
geohacker Jun 2, 2023
5002a02
Merge pull request #71 from developmentseed/instance-resource-env
geohacker Jun 8, 2023
c5a7512
enable staging deploy. use a burstable postgres
geohacker Nov 29, 2023
61f6afa
use this branch for staging deploy
geohacker Nov 29, 2023
8acb40a
keep comment commented
geohacker Nov 29, 2023
1a52514
fix sku for database
geohacker Nov 29, 2023
d7f93ea
k8s v1.25.11
geohacker Nov 30, 2023
1f2de66
reduce api, socket and redis resource requirements
geohacker Nov 30, 2023
00b5595
add traffic policy to ingress
geohacker Nov 30, 2023
5f99af4
deploy
geohacker Dec 4, 2023
bacf7ab
make maxinference 500km2
geohacker Dec 4, 2023
a472aaf
Update Base Deps
ingalls Jan 5, 2024
1c32dde
Get Deps to latest versions
ingalls Jan 5, 2024
54d18c4
Fix doc output
ingalls Jan 5, 2024
15c6ffa
Include schema in user test routes
ingalls Jan 5, 2024
a72c498
Get Flight checks working
ingalls Jan 5, 2024
203e08e
Remove doc call
ingalls Jan 5, 2024
369dc38
Update Schema Tests
ingalls Jan 5, 2024
25a8588
Require auth for creating mosaics
ingalls Jan 9, 2024
6cbaaf6
Fix aoi-timeframe-patch test
ingalls Jan 9, 2024
720e530
Fix lints
ingalls Jan 9, 2024
3bd6fc1
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
geohacker Jan 12, 2024
396da2a
Add Mosaic Tests
ingalls Jan 16, 2024
bbb2bd9
Fix lints
ingalls Jan 16, 2024
abbda96
Merge branch 'project-ts' of github.com:developmentseed/pearl-backend…
geohacker Jan 16, 2024
d88b621
Merge branch 'project-ts' into project-ts-staging-deploy
vgeorge Jan 16, 2024
292e565
Add Published Column
ingalls Jan 16, 2024
099d415
Setup CreateShare Body
ingalls Jan 16, 2024
3d5f348
Add Knex migration
ingalls Jan 16, 2024
6fc4784
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Jan 16, 2024
777bd71
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
ingalls Jan 16, 2024
e83447b
Add published field to response
ingalls Jan 16, 2024
a81fff3
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Jan 16, 2024
93b4f38
Add published to tests
ingalls Jan 16, 2024
5f2ba38
Support user given id
ingalls Jan 18, 2024
7ed8244
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Jan 18, 2024
ec678a3
Update Error
ingalls Jan 18, 2024
7e93aee
Add Mosic List API
ingalls Jan 18, 2024
eef706d
Return published key
ingalls Jan 25, 2024
1e3d57b
Update API deps
ingalls Jan 25, 2024
61485f5
Update Schema
ingalls Jan 25, 2024
a2f16b6
Add Delete & Patch
ingalls Jan 25, 2024
152f56d
Add Patch test
ingalls Jan 25, 2024
b364090
More Patch Share tests
ingalls Jan 29, 2024
d30bdba
Add CollectionID to Imagery Sources
ingalls Feb 5, 2024
dc66c17
Update Mosaic Tests
ingalls Feb 5, 2024
94a3fef
Add model to share
ingalls Feb 5, 2024
6644060
Add model & imagery
ingalls Feb 5, 2024
b5d6b5c
Add additional joins
ingalls Feb 5, 2024
6d49f0e
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
geohacker Feb 26, 2024
5eb5572
max 3 cpu nodes.
geohacker Feb 26, 2024
d27e583
Fix project delete
ingalls Feb 27, 2024
a6d6c17
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Feb 27, 2024
9a95949
Consistent Checkpoint ID
ingalls Feb 27, 2024
83c83b8
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Feb 27, 2024
ea6e8c0
pin azurecli version
geohacker Feb 27, 2024
34adc69
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
geohacker Feb 27, 2024
5283ee6
go to ubuntu 22.04
geohacker Feb 27, 2024
b7dbc21
use latest azure-cli
geohacker Feb 27, 2024
2f7e87d
try cli 2.51..0
geohacker Feb 27, 2024
bab2158
update azurerm version
geohacker Feb 27, 2024
1d59dd5
Additional Logging for TF Creation
ingalls Feb 27, 2024
221dbdc
Merge branch 'project-ts' into project-ts-staging-deploy
ingalls Feb 27, 2024
6e6e7c7
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
ingalls Feb 27, 2024
d114590
switch to a B2ms vm type
geohacker Feb 28, 2024
0819c1d
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
geohacker Feb 28, 2024
6ce21e6
Update error message
ingalls Feb 28, 2024
9f0a5c4
Merge branch 'project-ts-staging-deploy' of github.com:developmentsee…
ingalls Feb 28, 2024
1307bc5
Load Mosaic Name
ingalls Feb 28, 2024
cf7b9dd
Update core
ingalls Mar 1, 2024
091b785
Commit
ingalls Mar 1, 2024
3cb0676
Remove Instances
ingalls Mar 1, 2024
f010856
Fix project delete error
ingalls Mar 13, 2024
50c22f9
remove unused meta_load_timeframe
ingalls Mar 15, 2024
c079225
Consistent load behavior
ingalls Mar 15, 2024
811d912
Fix checkpointid
ingalls Mar 18, 2024
29b8606
Dep update
ingalls Mar 18, 2024
d60d1ad
Add InstanceDebug
ingalls Mar 18, 2024
e115b06
add checkpoint_id to create batch schema
ingalls Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .github/workflows/chartpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ jobs:
# run: ./scripts/cideploy --dev

# Uncomment this section to create a staging stack
# - name: Deploy -- Staging
# env:
# postgresPassword: ${{ secrets.TERRAFORM_STAGING_POSTGRES_PASSWORD }}
# auth0BaseUrl: ${{ secrets.STAGING_AUTH0_ISSUER_BASE_URL }}
# if: github.ref == 'refs/heads/develop'
# run: ./scripts/cideploy --staging
- name: Deploy -- Staging
env:
postgresPassword: ${{ secrets.TERRAFORM_STAGING_POSTGRES_PASSWORD }}
auth0BaseUrl: ${{ secrets.STAGING_AUTH0_ISSUER_BASE_URL }}
if: github.ref == 'refs/heads/project-ts-staging-deploy'
run: ./scripts/cideploy --staging

- name: Deploy -- Production
env:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Development Seed
Copyright (c) 2023 Development Seed

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
4 changes: 2 additions & 2 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

RUN apt-get update
RUN apt-get install -y wget unzip curl gnupg \
Expand All @@ -21,6 +21,6 @@ RUN mv terraform /usr/local/bin
RUN pip3 install -U pip

# Install azure client
RUN pip3 install azure-cli
RUN pip3 install azure-cli==2.51.0

WORKDIR /opt/src
16 changes: 14 additions & 2 deletions deployment/helm/pearl-helm/templates/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ spec:
- name: GpuImageTag
value: {{ .Values.gpu.image.tag }}
- name: GpuCount
value: {{ .Values.api.GpuCount | quote }}
value: {{ .Values.api.gpuCount | quote }}
- name: CpuCount
value: {{ .Values.api.CpuCount | quote }}
value: {{ .Values.api.cpuCount | quote }}
- name: Deployment
value: {{ template "lulc-helm.fullname" . }}
- name: TileUrl
Expand All @@ -91,4 +91,16 @@ spec:
value: ws://{{ template "lulc-helm.fullname" . }}-socket
- name: AUTH0_ISSUER_BASE_URL
value: {{ .Values.api.auth0BaseUrl }}
- name: LiveInferenceSize
value: {{ .Values.api.liveInferenceSize | quote }}
- name: MaxInferenceSize
value: {{ .Values.api.maxInferenceSize | quote }}
- name: InstanceRequestCPU
value: {{ .Values.api.instanceRequestCPU | quote }}
- name: InstanceRequestMemory
value: {{ .Values.api.instanceRequestMemory | quote }}
- name: InstanceLimitCPU
value: {{ .Values.api.instanceLimitCPU | quote }}
- name: InstanceLimitMemory
value: {{ .Values.api.instanceLimitMemory | quote }}
{{- end }}
1 change: 1 addition & 0 deletions deployment/helm/pearl-helm/templates/redis/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
operator: NotIn
values:
- "gpunodepool"
- "cpunodepool"
containers:
- name: {{ .Chart.Name }}-redis
image: "redis:latest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
values:
- "gpunodepool"
- "tiler"
- "cpunodepool"
containers:
- name: {{ .Chart.Name }}-socket
image: "{{ .Values.socket.image.name }}:{{ .Values.socket.image.tag }}"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/pearl-helm/templates/tiles/scaledobject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
spec:
scaleTargetRef:
name: {{ template "lulc-helm.fullname" . }}-tiles
minReplicaCount: 2
maxReplicaCount: 5
minReplicaCount: {{ .Values.tiles.minReplicaCount }}
maxReplicaCount: {{ .Values.tiles.minReplicaCount }}
cooldownPeriod: 300
pollingInterval: 20
triggers:
Expand Down
18 changes: 12 additions & 6 deletions deployment/helm/pearl-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ api:
replicaCount: 1
containerPort: 2000
gpuCount: 0
cpuCount: 2
cpuCount: 3
auth0BaseUrl: replace_manually
signingSecret: replace_manually
postgresUrl: replace_manually
liveInferenceSize: 100000000
maxInferenceSize: 500000000
instanceRequestCPU: '1500m'
instanceRequestMemory: '4Gi'
image:
name: 'chartpress_replace'
tag: 'chartpress_replace'
resources:
requests:
cpu: "0.5"
memory: 1.5Gi
cpu: "0.3"
memory: 1Gi
limits:
cpu: "4"
memory: 12Gi
Expand All @@ -31,8 +35,8 @@ socket:
tag: 'chartpress_replace'
resources:
requests:
cpu: "0.5"
memory: 1.5Gi
cpu: "0.2"
memory: 400Mi
limits:
cpu: "4"
memory: 8Gi
Expand All @@ -45,6 +49,8 @@ tiles:
debug: false
mosaicBackends: sqlite:///
mosaicHost: /tmp/data/mosaics.db
minReplicaCount: 2
maxReplicaCount: 5
image:
name: 'chartpress_replace'
tag: 'chartpress_replace'
Expand All @@ -64,7 +70,7 @@ redis:
enabled: true
resources:
requests:
cpu: "0.3"
cpu: "0.2"
memory: 600Mi
limits:
cpu: "0.3"
Expand Down
10 changes: 5 additions & 5 deletions deployment/terraform/resources/aks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "azurerm_kubernetes_cluster" "lulc" {
location = azurerm_resource_group.lulc.location
resource_group_name = azurerm_resource_group.lulc.name
dns_prefix = "${local.prefix}-cluster"
kubernetes_version = "1.20.13"
kubernetes_version = "1.25.11"

default_node_pool {
name = "nodepool1"
Expand Down Expand Up @@ -47,11 +47,11 @@ resource "azurerm_kubernetes_cluster_node_pool" "tiler" {
resource "azurerm_kubernetes_cluster_node_pool" "cpunodepool" {
name = "cpunodepool"
kubernetes_cluster_id = azurerm_kubernetes_cluster.lulc.id
vm_size = "Standard_DS2_v2"
vm_size = "Standard_B2ms"
vnet_subnet_id = azurerm_subnet.aks.id
enable_auto_scaling = true
min_count = 0
max_count = 2
min_count = 1
max_count = 3
tags = {
Environment = var.environment
ManagedBy = "AI4E"
Expand All @@ -66,7 +66,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "gpunodepool" {
vnet_subnet_id = azurerm_subnet.aks.id
enable_auto_scaling = true
min_count = 0
max_count = 2
max_count = 1
tags = {
Environment = var.environment
ManagedBy = "AI4E"
Expand Down
2 changes: 1 addition & 1 deletion deployment/terraform/resources/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "azurerm_postgresql_flexible_server" "lulc" {
administrator_login = "lulc"
administrator_password = var.postgres_password
storage_mb = 32768
sku_name = "GP_Standard_D4s_v3"
sku_name = "B_Standard_B1ms"
private_dns_zone_id = azurerm_private_dns_zone.lulc.id
delegated_subnet_id = azurerm_subnet.postgres.id
depends_on = [azurerm_private_dns_zone_virtual_network_link.lulc]
Expand Down
4 changes: 4 additions & 0 deletions deployment/terraform/resources/helm-ingress-nginx.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ resource "helm_release" "lulc-ingress-nginx" {
value = azurerm_public_ip.lulc.ip_address
}

set {
name = "controller.service.externalTrafficPolicy"
value = "Local"
}
}
2 changes: 1 addition & 1 deletion deployment/terraform/resources/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.4.0"
version = "=3.84.0"
}
helm = {
source = "hashicorp/helm"
Expand Down
21 changes: 5 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
api:
platform: linux/amd64
build: ./services/api/
command: sh -c "sleep 5; npm run dev"
command: sh -c "sleep 20 && npx knex migrate:latest && sleep 5 && npm run dev"
restart: always
links:
- postgis
depends_on:
- migration
- postgis
ports:
- "2000:2000"
environment:
Expand All @@ -35,6 +35,9 @@ services:
socket:
platform: linux/amd64
build: ./services/socket/
command: sh -c "sleep 30; npm run dev"
depends_on:
- api
ports:
- "1999:1999"
environment:
Expand All @@ -59,17 +62,3 @@ services:
image: redis:latest
ports:
- 6379:6379

migration:
platform: linux/amd64
build: ./services/api
command: sh -c "sleep 20; npx knex migrate:latest"
links:
- postgis
ports:
- "2001:2001"
depends_on:
- postgis
environment:
- PORT=2001
- Postgres=postgres://docker:docker@postgis:5432/gis
28 changes: 28 additions & 0 deletions helpers/create_sentinel_mosaic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import httpx

# Search against the Planetary Computer STAC API
endpoint = "https://planetarycomputer.microsoft.com"

# Define your temporal range
daterange = {"interval": ["2022-01-12T10:25:31Z", "2023-01-30T23:59:59Z"]}

# ##### Register Search query
search_request = {
"filter": {
"op": "and",
"args": [
{"op": "anyinteracts", "args": [{"property": "datetime"}, daterange]},
{"op": "=", "args": [{"property": "collection"}, "sentinel-2-l2a"]},
{"op": "<=", "args": [{"property": "eo:cloud_cover"}, 50]},
{"op": "<=", "args": [{"property": "s2:snow_ice_percentage"}, 50]},
],
},
"filter-lang": "cql2-json",
}

response = httpx.post(
f"{endpoint}/api/data/v1/mosaic/register",
json=search_request,
).json()
searchid = response["searchid"]
print('searchid', searchid)
1 change: 1 addition & 0 deletions helpers/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
httpx==0.23.3
Loading
Loading