Skip to content

Commit

Permalink
Containerize (#54)
Browse files Browse the repository at this point in the history
* add Dockerfile

* typo

* add deploy yaml

* add devfile

* harmonize versions

* remove unneeded deployment files
  • Loading branch information
swo authored Dec 26, 2024
1 parent a7b0fd2 commit aa33e9d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.13-slim

WORKDIR /app

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
build-essential \
curl \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*

COPY . .

RUN pip3 install poetry \
&& poetry config virtualenvs.in-project true \
&& poetry install

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["poetry", "run", "streamlit", "run", "ringvax/app.py", "--server.port=8501", "--server.address=0.0.0.0"]
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
app:
ENGINE = podman
TARGET = ringvax

.PHONY: run build_container run_container

run:
streamlit run ringvax/app.py

build_container:
$(ENGINE) build -t $(TARGET) -f Dockerfile

run_container:
$(ENGINE) run -p 8501:8501 --rm $(TARGET)

0 comments on commit aa33e9d

Please sign in to comment.