<commit_before>FROM ubuntu:14.04

RUN apt-get update
RUN apt-get install -y python-pip build-essential python-zmq tor privoxy rng-tools
RUN apt-get install -y python-dev python-pip g++ libjpeg-dev zlib1g-dev sqlite3 openssl
RUN apt-get install -y alien libssl-dev wget
ADD . /bazaar
RUN cd /bazaar && pip install -r requirements.txt
RUN cd /bazaar/pysqlcipher && python setup.py install
#
# workround https://github.com/OpenBazaar/OpenBazaar/pull/302/
#
RUN sed -i "s/http_ip = '127.0.0.1'/http_ip = '0.0.0.0'/g" /bazaar/node/tornadoloop.py

EXPOSE 8888 8889 8890 12345

WORKDIR /bazaar
ENV LOG_PATH /bazaar/logs/production.log
# touch log file before bash run.sh to keep tail -f work
RUN mkdir -p /bazaar/logs && touch $LOG_PATH
CMD bash run.sh && tail -f $LOG_PATH<commit_msg>clean tor privoxy and remove sed workround<commit_after>FROM ubuntu:14.04

RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y python-pip build-essential python-zmq rng-tools
RUN apt-get install -y python-dev g++ libjpeg-dev zlib1g-dev sqlite3 openssl
RUN apt-get install -y alien libssl-dev wget
ADD . /bazaar
RUN cd /bazaar && pip install -r requirements.txt
RUN cd /bazaar/pysqlcipher && python setup.py install

EXPOSE 8888 8889 8890 12345

WORKDIR /bazaar
ENV LOG_PATH /bazaar/logs/production.log
# touch log file before bash run.sh to keep tail -f work
RUN mkdir -p /bazaar/logs && touch $LOG_PATH
CMD IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}') && \
    bash run.sh -k $IP && tail -f $LOG_PATH
# clean tmp file
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
{'fraction_non_alphanumeric': 0.11586121437422553, 'fraction_numerical': 0.03841387856257745, 'mean_word_length': 3.575070821529745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2694383', 'n_tokens_mistral': 647, 'n_tokens_neox': 590, 'n_words': 202}