forked from alephdata/memorious
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
3 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 |
---|---|---|
|
@@ -4,4 +4,5 @@ data* | |
memorious.env | ||
docker-compose.* | ||
.git | ||
.gitignore | ||
.gitignore | ||
__pycache__ |
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,41 @@ | ||
FROM alpine | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ENV TESSDATA_PREFIX /usr/share/tesseract-ocr | ||
|
||
# Add OCR for captcha-breaking: | ||
RUN apk --no-cache add tesseract-ocr-dev | ||
|
||
# Not using py3-icu py3-pillow because they're outdated. | ||
RUN apk --no-cache add python3 python3-dev build-base \ | ||
# pillow dependencies: | ||
jpeg-dev zlib-dev libwebp-dev tiff-dev \ | ||
# pyicu dependencies: | ||
icu-dev \ | ||
# general ssl support, and requests[security]: | ||
ca-certificates libffi-dev openssl-dev \ | ||
# bundled dependencies: | ||
py3-lxml py3-psycopg2 py3-gunicorn | ||
|
||
RUN pip3 install -q pyicu requests[security] \ | ||
&& rm -rf /root/.cache | ||
|
||
COPY setup.py /memorious/ | ||
COPY memorious /memorious/memorious | ||
COPY ui /memorious/ui | ||
WORKDIR /memorious | ||
RUN pip3 install -q -e . \ | ||
&& rm -rf /root/.cache | ||
RUN pip3 install -q -e ./ui \ | ||
&& rm -rf /root/.cache | ||
|
||
ENV MEMORIOUS_BASE_PATH=/data \ | ||
MEMORIOUS_INCREMENTAL=true \ | ||
MEMORIOUS_EAGER=false \ | ||
C_FORCE_ROOT=true | ||
|
||
# # Web ui: | ||
# # RUN gunicorn -t 300 memorious_ui:app | ||
|
||
# # Worker: | ||
# # RUN celery -A memorious.tasks -c 10 -l INFO worker |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
all: clean test | ||
all: clean | ||
|
||
clean: | ||
rm -rf dist build .eggs | ||
|
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