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

Add Docker image #80

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
152d1aa
Dockerfile working
Mar 31, 2021
3f3a412
Comment
Mar 31, 2021
c6d12c1
One more comment
Mar 31, 2021
c947e1a
Debugging
Apr 4, 2021
5734687
Fixed bug, docker working again (4/4/21)
Apr 5, 2021
0c0723c
Formatting
Apr 5, 2021
f50beab
updating main.yml
Apr 5, 2021
e98e18a
Push all edits to new branch. Automatically builds
Apr 5, 2021
9a8bfeb
Add documentation for docker run commands in main README
Apr 7, 2021
c41fb00
docker.readme
BaileyMatrascia Apr 7, 2021
8cf6ab6
Merge docker fork to docker branch (#81)
enpuyou Apr 7, 2021
bb723ac
Correction to readme docker windows build
ahance27 Apr 7, 2021
3fc1413
Delete dockerbuild file
Apr 7, 2021
2665794
Change test.yml to main.yml
Apr 7, 2021
0cc8bc5
Merge branch 'master' into docker-image-updated-38(v2)
antlet Apr 7, 2021
b17c006
Fixed Dockerfile from fork
Apr 8, 2021
4987d59
Merge branch 'master' into docker-image-updated-38(v2)
noorbuchi Apr 14, 2021
5f79d58
Fix path cuased by change of scipt names
enpuyou Apr 14, 2021
2bf6c8b
Fix path in README due to file name changed
enpuyou Apr 14, 2021
8afb127
Comment out the local image run commad
enpuyou Apr 14, 2021
75e2100
Change port to 8501
enpuyou Apr 14, 2021
5c4ad24
Correction to Python Version Comment
ahance27 Apr 14, 2021
e627698
Removed unnecessary comment
ahance27 Apr 14, 2021
b1fbce8
Change maintainer names
Apr 14, 2021
2091931
Corrections and Deletions to dockerfile
ahance27 Apr 14, 2021
1dfddc0
Delete comment
Apr 14, 2021
20eb753
Changes made regarding "EXPOSE 8501" Command
ahance27 Apr 14, 2021
7a15767
Numpy deletion in pipfile
ahance27 Apr 14, 2021
ac3c45a
Added mac scripts to main folder
ahance27 Apr 14, 2021
ee5bd89
Deleted docker scripts folder, scripts now in main folder
ahance27 Apr 14, 2021
21bf78b
Delete readme_docker.md
antlet Apr 21, 2021
01ed646
Delete docker-build.yml
BennyWestsyde Apr 28, 2021
2aa4b23
Merge branch 'master' into docker-image-updated-38(v2)
antlet Apr 28, 2021
c0e4422
Merge branch 'master' into docker-image-updated-38(v2)
corlettim Apr 29, 2021
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
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Python Version 3.9
FROM python:3.9

LABEL version="0.1.0"
antlet marked this conversation as resolved.
Show resolved Hide resolved

LABEL description="An automated text-mining tool written in Python to measure \
the technical responsibility of students in computer science courses, being \
used to analyze students' markdown reflection documents and five questions \
survey based on Natural Language Processing in the Department of Computer \
Science at Allegheny College."

LABEL maintainer="Bennett Westfall, Andre Hance, Thomas Antle, Bailey Mastrascia"

COPY . /gatorminer

WORKDIR /gatorminer

RUN set -e && echo "Installing Pipenv..." \
&& pip install pipenv \
&& echo "Installing dependencies..." \
&& pipenv install --dev --skip-lock \
&& echo "Installing SpaCy models..." \
&& pipenv run python -m spacy download en_core_web_sm \
&& pipenv run python -m spacy download en_core_web_md

CMD ["pipenv", "run", "streamlit", "run", "streamlit_web.py"]
antlet marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 8501
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
[![codecov](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner/branch/master/graph/badge.svg)](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner)
[![Built with spaCy](https://img.shields.io/badge/built%20with-spaCy-09a3d5.svg)](https://spacy.io)
[![Built with Streamlit](https://img.shields.io/badge/built%20with-Streamlit-09a3d5.svg)](https://www.streamlit.io/)
[![Docker Build](https://github.com/BennyWestsyde/GatorMiner/actions/workflows/dockerbuild.yml/badge.svg)](https://github.com/BennyWestsyde/GatorMiner/actions/workflows/dockerbuild.yml)
![Docker Image Version (latest by date)](https://img.shields.io/docker/v/bennywestsyde/gatorminer?label=Last%20Built%20and%20Pushed)
Comment on lines +7 to +8
Copy link
Collaborator

Choose a reason for hiding this comment

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

These links to @BennyWestsyde personal fork of the project, please make sure to change them to the correct links to the original project in Allegheny-Ethical-CS organization


An automated text-mining tool written in Python to measure the technical
responsibility of students in computer science courses, being used to analyze
Expand Down Expand Up @@ -50,6 +52,20 @@ pipenv run python -m spacy download en_core_web_sm
pipenv run python -m spacy download en_core_web_md
```

Alternatively, run a Docker container with all necessary dependencies and Spacy models installed.

Run the Docker container for Mac:

```bash
sh scripts/docker_run.sh
```

Run the Docker container for Windows:

```bash
sh scripts/docker_run.bat
```

## Web Interface

GatorMiner is mainly developed on its web interface with [Streamlit](https://www.streamlit.io)
Expand Down
2 changes: 2 additions & 0 deletions docker_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo [+] (Win_OS) Building Docker Container.
docker build -t gatorminer .
3 changes: 3 additions & 0 deletions docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
printf "\n[+] (Mac) Building Docker Container"
docker build -t gatorminer .
2 changes: 2 additions & 0 deletions docker_run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo [+] (Win_OS) Running Docker Container.
docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501"
6 changes: 6 additions & 0 deletions docker_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
printf "\n[+] (Mac) Running Docker Container"
docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501"

# Run gatorminer container from the local image
# docker run -it -d -p 8501:8501 gatorminer