Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5bbd780
replace pdm with uv with latest packages
kshitijrajsharma Apr 25, 2025
14f2734
feat(prediction): adds prediction model
kshitijrajsharma May 7, 2025
1e0c285
feat(prediction): add prediction workspace and implement prediction task
kshitijrajsharma May 8, 2025
37626d7
Update code structure and remove redundant sections
kshitijrajsharma May 8, 2025
384d44b
refact: remove old prediction added permission on the endpoints
kshitijrajsharma May 9, 2025
b1827b8
chore: update code structure for better readability and maintainability
kshitijrajsharma May 12, 2025
de918d1
chore: use ARG for base image in Dockerfile for better flexibility
kshitijrajsharma May 12, 2025
64f8f6d
fix: update Dockerfile to include manage.py in the app copy step
kshitijrajsharma May 12, 2025
e2df233
chore: restructure Dockerfile and remove unused dependencies for impr…
kshitijrajsharma May 12, 2025
adae56c
fix: add missing group flag in requirements generation step in Docker…
kshitijrajsharma May 12, 2025
4722ecd
fix: add compatial smaller version of dockerfile for workers
kshitijrajsharma May 12, 2025
f00e2e0
fix: update Docker workflow to support multi-build types and remove u…
kshitijrajsharma May 12, 2025
ebfa8ec
fix: update Dockerfile references in docker-compose files for backend…
kshitijrajsharma May 13, 2025
a4b8f4d
fix-ci : update Dockerfile references and add build type matrix for w…
kshitijrajsharma May 13, 2025
db2244d
fix: rename job identifiers for consistency in Docker build workflow
kshitijrajsharma May 13, 2025
996fe72
fix: update Dockerfile references in Docker Compose and remove obsole…
kshitijrajsharma May 13, 2025
0bacc78
refactor: update frontend Dockerfile structure and remove obsolete files
kshitijrajsharma May 14, 2025
94e3664
Refactor Docker Compose configurations and update initialization script
kshitijrajsharma May 22, 2025
08062d6
fix: reorganize imports and add setup_ramp function for environment c…
kshitijrajsharma May 23, 2025
f4c3e94
refactor: add docker-compose configuration with profiles for consiste…
kshitijrajsharma May 23, 2025
d0ea6f1
fix: update geomltoolkits dependency version and improve chips folder…
kshitijrajsharma May 24, 2025
1973862
feat: add S3 upload configuration and update tasks for conditional up…
kshitijrajsharma May 24, 2025
4a5ecea
feat: add offline predictor image build and publish workflows, update…
kshitijrajsharma May 24, 2025
13d638a
feat: update Dockerfile to streamline dependency installation and add…
kshitijrajsharma May 24, 2025
943e8cb
debug: comment out final stage in Dockerfile.workers for debugging im…
kshitijrajsharma May 24, 2025
c6cf704
fix : NVM issue for the GPU models fixed !
kshitijrajsharma May 24, 2025
81b2261
Merge pull request #409 from hotosm/develop
kshitijrajsharma May 24, 2025
b227510
feat: update prediction worker configuration in docker-compose and mo…
kshitijrajsharma May 24, 2025
547d4cb
fix: update logging message for prediction failure in tasks.py
kshitijrajsharma May 24, 2025
8deb190
fix : prediction post processing for offline workers
kshitijrajsharma May 24, 2025
bb71555
fix: update backend build workflow to use wget for downloading baseli…
kshitijrajsharma May 24, 2025
ff8608e
fix: add default bbox to prediction config to ensure validation passes
kshitijrajsharma May 24, 2025
2599f9b
ci : refactor to add uv
kshitijrajsharma May 26, 2025
a7dbc1e
fix: add gdal installation step in backend build workflow
kshitijrajsharma May 26, 2025
f210baf
ci: remove outdated backend build workflow and add redis build workfl…
kshitijrajsharma May 26, 2025
d23c5e2
fix: add missing permissions for actions in Docker build workflow
kshitijrajsharma May 26, 2025
33ec853
fix: add CELERY_BROKER_URL and CELERY_RESULT_BACKEND environment vari…
kshitijrajsharma May 26, 2025
6a32fe9
fix: update Redis service configuration and remove unused environment…
kshitijrajsharma May 26, 2025
5cc850e
fix: comment out unused feedback-related URL patterns in urls.py
kshitijrajsharma May 26, 2025
e676dcc
fix: restructure training feedback payload and update feedback submis…
kshitijrajsharma May 26, 2025
a56c30c
fix: comment out unused test for fetching feedback Aoi OSM label
kshitijrajsharma May 26, 2025
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
  •  
  •  
  •  
99 changes: 99 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Ignore Python cache and virtualenv files
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.pyc
*.pyo
.Python
env/
venv/
ENV/
VENV/
*.env
*.venv

backend/env/
backend/venv/
backend/ENV/
backend/VENV/
backend/*.env
backend/*.venv


# Ignore pip and poetry files/directories
pip-log.txt
pip-delete-this-directory.txt
poetry.lock

# Ignore Django static/media output (customize as needed)
static/
media/

# Ignore test and coverage artifacts
.coverage
.tox/
.nox/
.pytest_cache/
htmlcov/
.coverage.*
.cache
.mypy_cache/
.dmypy.json
.pyre/
.pytype/

# Ignore log files
*.log

# Ignore IDE/editor files
.vscode/
.idea/
*.sublime-workspace
*.sublime-project
*.swp
*.swo

# Ignore OS files
.DS_Store
Thumbs.db

# Ignore frontend build and dependency directories
frontend/node_modules/
frontend/build/
frontend/dist/
frontend/.env
frontend/.next/
frontend/.cache/
frontend/.turbo/

# Ignore backend specific (if any)
backend/node_modules/
backend/staticfiles/
backend/.env
backend/.venv
backend/.pytest_cache/
backend/migrations/
backend/db.sqlite3

# Ignore git
.git/
.gitignore

# Ignore Docker files themselves (don't copy into image)
Dockerfile
backend/Dockerfile.*
frontend/Dockerfile.*
.dockerignore

# Ignore miscellaneous
*.sqlite3
*.db
*.bak
*.orig
*.tmp
tmp/
*.pem
*.crt
*.key
*.lock
138 changes: 0 additions & 138 deletions .github/workflows/backend_build.yml

This file was deleted.

75 changes: 65 additions & 10 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker Images for backend
name: Build Docker Images

on:
push:
Expand All @@ -23,11 +23,12 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-api-image:
build-api-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
actions: write
steps:
- name: Remove unnecessary files
run: |
Expand Down Expand Up @@ -56,20 +57,24 @@ jobs:
uses: docker/build-push-action@v6
with:
context: backend/
file: backend/Dockerfile_CPU
file: backend/Dockerfile.API
push: false
tags: ${{ steps.meta_api.outputs.tags }}
labels: ${{ steps.meta_api.outputs.labels }}
cache-from: type=gha,scope=api,timeout=20m
cache-to: type=gha,mode=max,scope=api,timeout=20m,ignore-error=true
github-token: ${{ secrets.GITHUB_TOKEN }}

build-and-push-worker-image:
needs: build-and-push-api-image
build-worker-image:
needs: build-api-image
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [cpu, gpu]
permissions:
contents: read
packages: write
actions: write
steps:
- name: Remove unnecessary files
run: |
Expand All @@ -89,19 +94,69 @@ jobs:
id: meta_worker
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_worker
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_worker
tags: |
type=raw,value=latest-${{ matrix.build_type }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Worker Docker image
- name: Build and push Worker Docker image (${{ matrix.build_type }})
uses: docker/build-push-action@v6
with:
context: backend/
file: backend/Dockerfile
file: backend/Dockerfile.workers
push: false
build-args: |
BUILD_TYPE=${{ matrix.build_type }}
tags: ${{ steps.meta_worker.outputs.tags }}
labels: ${{ steps.meta_worker.outputs.labels }}
cache-from: type=gha,scope=docker-worker,timeout=20m
cache-to: type=gha,mode=min,scope=docker-worker,timeout=20m,ignore-error=true
cache-from: type=gha,scope=docker-worker-${{ matrix.build_type }},timeout=20m
cache-to: type=gha,mode=min,scope=docker-worker-${{ matrix.build_type }},timeout=20m,ignore-error=true
github-token: ${{ secrets.GITHUB_TOKEN }}

build-offline-predictor-image:
runs-on: ubuntu-24.04
needs: build-api-image
permissions:
contents: read
packages: write
actions: write
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Offline Predictor Docker
id: meta_offline_predictor
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_offline_predictor

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Offline Predictor Docker image
uses: docker/build-push-action@v6
with:
context: backend/
file: backend/Dockerfile.API
push: false
build-args: |
BUILD_TARGET=predictor
tags: ${{ steps.meta_offline_predictor.outputs.tags }}
labels: ${{ steps.meta_offline_predictor.outputs.labels }}
cache-from: type=gha,scope=offline-predictor,timeout=20m
cache-to: type=gha,mode=max,scope=offline-predictor,timeout=20m,ignore-error=true
github-token: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading