<commit_before>#
# To build:
# > sudo docker build -t scrapyrt .
#
# to start as daemon with port 9080 of api exposed as 9080 on host
# and host's directory ${PROJECT_DIR} mounted as /scrapyrt/project
#
# > sudo docker run -p 9080:9080 -tid -v ${PROJECT_DIR}:/scrapyrt/project scrapyrt
#

FROM ubuntu:14.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 627220E7
RUN echo 'deb http://archive.scrapy.org/ubuntu scrapy main' | tee /etc/apt/sources.list.d/scrapy.list

RUN apt-get update && \
    apt-get install -y python python-dev python-pip \
    libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libssl-dev

RUN mkdir -p /scrapyrt/src /scrapyrt/project
RUN mkdir -p /var/log/scrapyrt

WORKDIR /scrapyrt/src

ADD requirements.txt /scrapyrt/src/requirements.txt
RUN pip install -r requirements.txt

ADD . /scrapyrt/src
RUN pip install /scrapyrt/src

WORKDIR /scrapyrt/project

ENTRYPOINT ["scrapyrt"]

EXPOSE 9080<commit_msg>add "-i 0.0.0.0" do Dockerfile ENTRYPOINT<commit_after>#
# To build:
# > sudo docker build -t scrapyrt .
#
# to start as daemon with port 9080 of api exposed as 9080 on host
# and host's directory ${PROJECT_DIR} mounted as /scrapyrt/project
#
# > sudo docker run -p 9080:9080 -tid -v ${PROJECT_DIR}:/scrapyrt/project scrapyrt
#

FROM ubuntu:14.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 627220E7
RUN echo 'deb http://archive.scrapy.org/ubuntu scrapy main' | tee /etc/apt/sources.list.d/scrapy.list

RUN apt-get update && \
    apt-get install -y python python-dev python-pip \
    libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libssl-dev

RUN mkdir -p /scrapyrt/src /scrapyrt/project
RUN mkdir -p /var/log/scrapyrt

WORKDIR /scrapyrt/src

ADD requirements.txt /scrapyrt/src/requirements.txt
RUN pip install -r requirements.txt

ADD . /scrapyrt/src
RUN pip install /scrapyrt/src

WORKDIR /scrapyrt/project

ENTRYPOINT ["scrapyrt", "-i 0.0.0.0"]

EXPOSE 9080
{'fraction_non_alphanumeric': 0.11172344689378758, 'fraction_numerical': 0.04008016032064128, 'mean_word_length': 3.687793427230047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6973840', 'n_tokens_mistral': 840, 'n_tokens_neox': 736, 'n_words': 212}