-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from cwerner/dockerfile
Add a dockerfile for running the streamlit app Former-commit-id: 397ccd9
- Loading branch information
Showing
5 changed files
with
67 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tests | ||
.remove | ||
.vscode | ||
assets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# syntax=docker/dockerfile:1.3 | ||
FROM ubuntu:latest | ||
EXPOSE 8501 | ||
WORKDIR /app | ||
RUN mkdir /usr/src/app | ||
COPY requirements.txt /usr/src/app/ | ||
RUN apt-get update && \ | ||
apt-get install software-properties-common -y && \ | ||
apt-add-repository ppa:ubuntugis/ubuntugis-unstable && \ | ||
apt-get update && \ | ||
apt-get install git curl python3 python3-pip gdal-bin libgdal-dev -y && \ | ||
python3 -m pip install --upgrade pip && \ | ||
python3 -m pip install GDAL==3.4.1 && \ | ||
python3 -m pip install -r /usr/src/app/requirements.txt | ||
COPY . /usr/src/app | ||
RUN python3 -m pip install -e /usr/src/app | ||
WORKDIR /usr/src/app | ||
ENV PYTHONPATH "/usr/src/app:${PYTHONPATH}" | ||
CMD ["dlsc", "--gui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
NAME := cwerner/ldndctools | ||
TAG := $$(git log -1 --pretty=%h) | ||
IMG := ${NAME}:${TAG} | ||
LATEST := ${NAME}:latest | ||
|
||
export DOCKER_BUILDKIT := 1 | ||
export $(xargs < .env) | ||
|
||
build: | ||
@echo ${TAG} | ||
@docker build -t ${IMG} . | ||
@docker tag ${IMG} ${LATEST} | ||
|
||
push: | ||
@docker push ${NAME} | ||
|
||
run: | ||
@docker run --rm -p 8501:8501 --env-file .env ${LATEST} | ||
|
||
login: | ||
@docker log -u ${DOCKER_USER} -p ${DOCKER_PASS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters