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

Making sotawhat instantly usable to docker users #10

Open
wants to merge 2 commits 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.6.6-alpine

RUN apk add --no-cache \
enchant \
#tini \
aspell-en


COPY requirements.txt /
RUN pip install -r /requirements.txt && \
#todo: download file directly to prevent re-download
python -c "import nltk; nltk.download('punkt')"

COPY . /app
WORKDIR /app


#ENTRYPOINT ["/sbin/tini", "--", "python", "--", "sotawhat.py"]
ENTRYPOINT ["python", "--", "sotawhat.py"]

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ For example:
$ python3 sotawhat.py "perplexity" 10
```

If you are using docker:

```bash
$ docker run --rm -it bulletninja/sotawhat "perplexity" 10
```

If you don't specify the number of results, by default, the script returns 5 results. Each result contains the title of the paper with author and published date, a summary of the abstract, and link to the paper.

We've found that this script works well with keywords that are:
Expand Down