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

feat: add docker file for web_checking.py #31

Merged
merged 6 commits into from
Sep 22, 2023
Merged
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
23 changes: 23 additions & 0 deletions Dockerfile
wiktorlazarski marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# app/Dockerfile

FROM python:3.7-slim

EXPOSE ${PORT}

WORKDIR /app

RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg \
libsm6 \
libxext6 \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
wiktorlazarski marked this conversation as resolved.
Show resolved Hide resolved

RUN git clone https://github.com/wiktorlazarski/head-segmentation.git .

RUN pip3 install -e .

ENTRYPOINT exec python -m streamlit run apps/web_checking.py --server.port=$PORT --server.address=0.0.0.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question: would that be possible to make this Dockerfile slightly more generic by parametrising Streamlit app that should be started? I'm thinking about structure that looks something like:

Suggested change
ENTRYPOINT exec python -m streamlit run apps/web_checking.py --server.port=$PORT --server.address=0.0.0.0
ENTRYPOINT exec python -m streamlit run apps/$APP_SCRIPT --server.port=$PORT --server.address=0.0.0.0

wdyt?

Copy link
Collaborator Author

@Szuumii Szuumii Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a very neat idea! However, currently there is absolutely no need for that since we ONLY want web_checking.py to run in the cloud and this change would force us to reconfigure current cloud deployment which I'm against.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense if we'd have another 'deployable' version e.g backend API (we can think about it in the future)

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ ______________________________________________________________________

</div>

## 🔍 Preview
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Quick model spot-checking, wdyt?

Copy link
Collaborator Author

@Szuumii Szuumii Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd stick with preview, but I leave the decision to you


Feel free to checkout our Streamlit application at https://head-segmentation-d4mc3a3f3q-lm.a.run.app/

## 💎 Installation with `pip`

Installation is as simple as running:
Expand Down
Loading