Skip to content

Commit

Permalink
7/27/21
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuscombe-usgs committed Jul 28, 2021
1 parent 63c1408 commit 4688ffc
Show file tree
Hide file tree
Showing 9 changed files with 485 additions and 501 deletions.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,64 @@ More demonstration videos (older version of the program):

![Coast Train example 2](https://raw.githubusercontent.com/dbuscombe-usgs/dash_doodler/main/assets/logos/doodler-demo-2-9-21-short-coast2.gif)

<!--
## Docker workflows
```
sudo docker pull mardascience/dash_doodler:d1
```
```
sudo docker volume create doodler_data
sudo docker run -p 8050:8050 mardascience/dash_doodler:d1
sudo docker volume inspect doodler_data
sudo docker volume create --driver local -o o=bind -o type=none -o device="/home/marda/test" doodler_data
sudo docker run -d -p 8050:8050 --name doodler_container --mount source=doodler_data,target=/app mardascience/dash_doodler:d1
sudo docker inspect doodler_container
```
To build your own docker based on miniconda `continuumio/miniconda3`
```
cp install/Dockerfile.miniconda ./Dockerfile
sudo docker build -t doodler_docker_image .
```
then when it has finished building, check its size
```
sudo docker image ls doodler_docker_image
```
It is large - 4.8 GB. Run it:
```
sudo docker run -p 8050:8050 -d -it --name www doodler_docker_image
```
Build with pip instead:
```
cp install/Dockerfile.pip ./Dockerfile
sudo docker build -t doodler_docker_image_pip .
```
How large is that?
```
sudo docker image ls doodler_docker_image_pip
```
To stop and remove:
```
sudo docker stop www
sudo docker rm www
``` -->


## <a name="ack"></a>Acknowledgements

Expand Down
4 changes: 2 additions & 2 deletions doodler.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def shapes_seg_pair_as_dict(d, key, seg, remove_old=True):
# Slider for specifying pen width
dcc.Slider(
id="crf-downsample-slider",
min=2,
min=1,
max=6,
step=1,
value=DEFAULT_CRF_DOWNSAMPLE,
Expand Down Expand Up @@ -410,7 +410,7 @@ def shapes_seg_pair_as_dict(d, key, seg, remove_old=True):
# Slider for specifying pen width
dcc.Slider(
id="rf-downsample-slider",
min=2,
min=1,
max=20,
step=1,
value=DEFAULT_RF_DOWNSAMPLE,
Expand Down
23 changes: 23 additions & 0 deletions install/Dockerfile.miniconda
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
FROM continuumio/miniconda3
LABEL maintainer "Doodler, by Dr Daniel Buscombe, Marda Science/USGS <[email protected]>"
WORKDIR /
# The code to run when container is started:
COPY ./ ./

COPY install/dashdoodler.yml .
RUN conda env create -f dashdoodler.yml

# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "dashdoodler", "/bin/bash", "-c"]

EXPOSE 8050/tcp
EXPOSE 8050/udp
EXPOSE 80
EXPOSE 8080

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "dashdoodler", "python", "doodler.py"]
4 changes: 2 additions & 2 deletions my_defaults.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DEFAULT_PEN_WIDTH = 3
DEFAULT_CRF_DOWNSAMPLE = 2
DEFAULT_RF_DOWNSAMPLE = 2
DEFAULT_CRF_DOWNSAMPLE = 1
DEFAULT_RF_DOWNSAMPLE = 1
DEFAULT_CRF_THETA = 1
DEFAULT_CRF_MU = 1
DEFAULT_CRF_GTPROB = 0.9
Binary file added src/__pycache__/defaults.cpython-36.pyc
Binary file not shown.
Binary file added src/__pycache__/image_segmentation.cpython-36.pyc
Binary file not shown.
6 changes: 5 additions & 1 deletion utils/gen_npz_4_zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def make_npz():
data[k] = dat[k]
del dat

classes = data['classes']
try:
classes = data['classes']
except:
classes = ['water', 'land']

class_string = '_'.join([c.strip() for c in classes])

savez_dict = dict()
Expand Down
Loading

0 comments on commit 4688ffc

Please sign in to comment.