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

Update Dockerfile and dependencies #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
FROM python:3.7
FROM python:3.9

EXPOSE 8501

WORKDIR /app

COPY requirements.txt ./requirements.txt

RUN pip3 install -r requirements.txt

COPY . .

CMD streamlit run app.py
2 changes: 1 addition & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from PIL import Image
from source import preprocess_input_image, batch_predict, conv_float_int, combine_image, load_trained_model, burn_area
import numpy as np
from keras import backend as K
from tensorflow.compat.v1.keras import backend as K
from tensorflow.python.lib.io import file_io
import boto3
from keras.models import load_model
Expand Down
13 changes: 7 additions & 6 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
matplotlib==3.2.1
numpy==1.18.4
streamlit==0.59.0
tensorflow==1.15.2
Keras==2.0.0
Pillow==7.1.2
matplotlib==3.8.3
numpy==1.26.4
streamlit==1.31.1
tensorflow==2.15.0.post1
keras==2.15.0
pillow==10.2.0
boto3==1.34.49
2 changes: 1 addition & 1 deletion app/source.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import numpy as np
from tensorflow.keras.models import load_model
from keras import backend as K
from tensorflow.compat.v1.keras import backend as K
from PIL import Image

def add_image_magin(input_image, im_width=720, im_height=480, color=0):
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'

name: wildfire

services:
app:
build:
context: ./app
dockerfile: Dockerfile
ports:
- 8501:8501
volumes:
- ./app:/app