Skip to content

Commit

Permalink
Add solaris back to the place for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Oct 4, 2023
1 parent 31374b2 commit 6a8e83c
Show file tree
Hide file tree
Showing 570 changed files with 33,716 additions and 94 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ frontend/node_modules
frontend/.pnp
frontend/.pnp.js

#standard
.env
**/.vscode/**
postgres-data/

# testing
frontend/coverage
postgres-data/*
Expand All @@ -28,7 +33,7 @@ frontend/package-lock*

frontend/.env

# for
# for backend
backend/static
backend/api_static
backend/env
Expand All @@ -40,8 +45,7 @@ backend/media
backend/data/*
backend/log/*
backend/training/*
trainings/*
backend/.env
backend/config.txt
backend/postgres-data
**/.vscode/**
postgres-data/
backend/postgres-data
53 changes: 32 additions & 21 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
# Use a specific base image with GPU support
FROM tensorflow/tensorflow:2.9.2-gpu

# ENV PIP_NO_CACHE_DIR=1
ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive

COPY requirements.txt requirements.txt
COPY docker/ramp/docker-requirements.txt docker-requirements.txt

RUN apt-get update &&\
apt-get install -y --no-install-recommends \
gdal-bin \
libgdal-dev \
python3-opencv && \
pip install --upgrade --user pip \
&& pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version` \
&& pip install --user -r docker-requirements.txt \
&& pip install --user fair-solaris==0.4.1 \
&& pip install --user ramp-fair \
&& pip install --user setuptools --upgrade \
&& pip install --user -r requirements.txt && \
apt-get clean -y && \
apt-get autoremove -y && \c
# Update package lists and install necessary dependencies in a single step
RUN apt-get update && \
apt-get install -y python3-opencv gdal-bin libgdal-dev && \
add-apt-repository ppa:ubuntugis/ppa && \
apt-get update && \
rm -rf /var/lib/apt/lists/*

# Set environment variables for GDAL
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal

# Install specific version of NumPy
RUN pip install numpy==1.23.5

# Install GDAL with specified options
RUN pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==$(gdal-config --version)

# Copy and install Python requirements
COPY docker/ramp/docker-requirements.txt /tmp/docker-requirements.txt
RUN pip install -r /tmp/docker-requirements.txt

# Upgrade setuptools
RUN pip install --upgrade setuptools

COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

# Install solaris and scikit-fmm packages
COPY docker/ramp/solaris /tmp/solaris
RUN pip install /tmp/solaris --use-feature=in-tree-build && \
pip install scikit-fmm --use-feature=in-tree-build

# Set working directory and copy the application code
WORKDIR /app
COPY . /app
27 changes: 0 additions & 27 deletions backend/Dockerfile _CPU

This file was deleted.

39 changes: 39 additions & 0 deletions backend/Dockerfile_CPU
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Use a specific base image with the desired TensorFlow version
FROM tensorflow/tensorflow:2.9.2

# Update package lists and install necessary dependencies in a single step
RUN apt-get update && \
apt-get install -y software-properties-common python3-opencv && \
add-apt-repository ppa:ubuntugis/ppa && \
apt-get update && \
apt-get install -y gdal-bin libgdal-dev && \
rm -rf /var/lib/apt/lists/*

# Set environment variables for GDAL
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal

# Install specific version of NumPy
RUN pip install numpy==1.23.5

# Install GDAL with specified options
RUN pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==$(gdal-config --version)

# Copy and install Python requirements
COPY docker/ramp/docker-requirements.txt /tmp/docker-requirements.txt
RUN pip install -r /tmp/docker-requirements.txt

# Upgrade setuptools
RUN pip install --upgrade setuptools

COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

# Install solaris and scikit-fmm packages
COPY docker/ramp/solaris /tmp/solaris
RUN pip install /tmp/solaris --use-feature=in-tree-build && \
pip install scikit-fmm --use-feature=in-tree-build

# Set working directory and copy the application code
WORKDIR /app
COPY . /app
2 changes: 0 additions & 2 deletions backend/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ def download_imagery(start: list, end: list, zm_level, base_path, source="maxar"

start_x = start_x + 1 # increase the x

logging.info(download_urls)

# Use the ThreadPoolExecutor to download the images in parallel

# with concurrent.futures.ThreadPoolExecutor() as executor:
Expand Down
2 changes: 1 addition & 1 deletion backend/docker/ramp/docker-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ tqdm==4.62.3
unicodedata2==14.0.0
urllib3==1.26.7
wheel==0.37.1
xyzservices==2022.3.0
xyzservices==2022.3.0
3 changes: 3 additions & 0 deletions backend/docker/ramp/solaris/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.ipynb filter=nbstripout

*.ipynb diff=ipynb
47 changes: 47 additions & 0 deletions backend/docker/ramp/solaris/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Report an error or other suspected bug behavior
title: "[BUG]: (your description here)"
labels: 'Status: Review Needed, Type: bug'
assignees: ''

---

_Thank you for helping us improve `solaris`!_

## Summary of the bug
A clear and concise description of what the bug is.

## Steps to reproduce the bug
Please either paste sample code used to generate the buggy behavior below, or provide step-by-step instructions to reproduce the problem.

```
Paste bug-causing code here
```

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Buggy behavior and/or error message
Please describe the buggy behavior and/or paste output here.
```
Paste output here
```

## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
If applicable, add screenshots to help explain your problem.

## Environment information
- OS:
- `solaris` version:
- python version:
- version of any relevant dependencies (optional - we may ask for this information later if not provided)

## Additional context
Add any other context about the problem here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Documentation
about: Request for additional documentation, clarification of existing documentation, or tutorials
title: "[DOCS]"
labels: 'Status: Review Needed, Type: Documentation'
assignees: ''

---

_Thank you for helping to improve `solaris`!_

## Documentation request summary

A short summary of the changes you'd like made to the documentation.

## Task detail and notes

List any additional information, links, or other content here that is needed to make the changes you're requesting.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]: (short description)"
labels: 'Status: Review Needed, Type: Enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
22 changes: 22 additions & 0 deletions backend/docker/ramp/solaris/.github/ISSUE_TEMPLATE/maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Maintenance
about: Request for maintenance, refactoring, or related tasks
title: "[MAINT]"
labels: 'Status: Review Needed, Type: Maintenance'
assignees: ''

---

## Maintenance request summary

A short summary of the maintenance to perform, including why it needs to be done.

## Task detail and notes

Any additional information:

- What other code will this impact?

- Do new tests need to be written or do existing tests need to be updated?

- Will this impact documentation?
Loading

0 comments on commit 6a8e83c

Please sign in to comment.