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

Feature/non osm #170

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into feature/non-osm
kshitijrajsharma authored Oct 9, 2023
commit fb9545d258f7bcb27c2463c4c67a0490fe5dce2e
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -48,4 +48,5 @@ backend/training/*
trainings/*
backend/.env
backend/config.txt
backend/postgres-data
backend/postgres-data

3 changes: 2 additions & 1 deletion backend/Dockerfile_CPU
Original file line number Diff line number Diff line change
@@ -36,4 +36,5 @@ RUN pip install /tmp/solaris --use-feature=in-tree-build && \

# Set working directory and copy the application code
WORKDIR /app
COPY . /app
COPY . /app

4 changes: 1 addition & 3 deletions backend/core/utils.py
Original file line number Diff line number Diff line change
@@ -173,9 +173,7 @@ def download_imagery(start: list, end: list, zm_level, base_path, source="maxar"
y_value = download_path[1]
source_value = source
download_url = source_value.format(
x=download_path[0], y=y_value, z=zm_level
)

x=download_path[0], y=y_value, z=zm_level)
download_urls.append(download_url)

start_y = start_y - 1 # decrease the y
53 changes: 53 additions & 0 deletions docs/Docker-installation.md
Original file line number Diff line number Diff line change
@@ -132,6 +132,59 @@ Docker Compose is created with redis , worker , postgis database , api and fron
Frontend will be available on 5000 port , Backend will be on 8000 , Flower will be on 5500


10. Want to run your local tiles ?

You can use [titler](https://github.com/developmentseed/titiler) , [gdals2tiles](https://gdal.org/programs/gdal2tiles.html) or nginx to run your own TMS server and add following to docker compose in order to access your localhost through docker containers . Add those to API and Worker . Make sure you update the .env variable accordingly

```
network_mode: "host"
```
Example docker compose :

```
backend-api:
build:
context: ./backend
dockerfile: Dockerfile_CPU
container_name: api
command: python manage.py runserver 0.0.0.0:8000

ports:
- 8000:8000
volumes:
- ./backend:/app
- ${RAMP_HOME}:/RAMP_HOME
- ${TRAINING_WORKSPACE}:/TRAINING_WORKSPACE
depends_on:
- redis
- postgres
network_mode: "host"

backend-worker:
build:
context: ./backend
dockerfile: Dockerfile_CPU
container_name: worker
command: celery -A aiproject worker --loglevel=INFO --concurrency=1

volumes:
- ./backend:/app
- ${RAMP_HOME}:/RAMP_HOME
- ${TRAINING_WORKSPACE}:/TRAINING_WORKSPACE
depends_on:
- backend-api
- redis
- postgres
network_mode: "host"
```

Example .env after host change :

```
DATABASE_URL=postgis://postgres:admin@localhost:5434/ai
CELERY_BROKER_URL="redis://localhost:6379/0"
CELERY_RESULT_BACKEND="redis://localhost:6379/0"
```
### fAIr setup for CPU :

This is still in test , Currently CPU version can be swamp by
You are viewing a condensed version of this merge commit. You can view the full changes here.