<commit_before>FROM python:2.7.11
EXPOSE 80
ENV MYDIR /tfdnapredictions
RUN apt-get update
RUN apt-get install nodejs -y
RUN apt-get install npm -y
RUN ln -s /usr/bin/nodejs /usr/bin/node

# Install bigBedToBed
ADD http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bigBedToBed /usr/local/bin/bigBedToBed
RUN ["chmod", "777", "/usr/local/bin/bigBedToBed"]

# Install global dependencies
RUN npm install -g npm
RUN npm install webpack -g
RUN ["pip", "install", "gunicorn"]

# Install project dependencies - dependency files are added independently so that
# changes to application source code don't trigger a cache invalidation at this step
WORKDIR ${MYDIR}

ADD requirements.txt ${MYDIR}/
RUN ["pip", "install", "-r", "requirements.txt"]

# install portal requirements
WORKDIR ${MYDIR}/portal
ADD portal/package.json ${MYDIR}/portal/package.json
RUN npm install
RUN npm install --only=dev

# Now add the rest of the application source and run webpack
ADD . ${MYDIR}
RUN webpack

WORKDIR ${MYDIR}
CMD ["gunicorn", "--bind", "0.0.0.0:80", "--timeout", "180", "--log-level=debug", "webserver:app"]
<commit_msg>upgrade nodejs inside Dockerfile<commit_after>FROM python:2.7.11
EXPOSE 80
ENV MYDIR /tfdnapredictions
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN apt-get install -y nodejs

# Install bigBedToBed
ADD http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bigBedToBed /usr/local/bin/bigBedToBed
RUN ["chmod", "777", "/usr/local/bin/bigBedToBed"]

# Install global dependencies
RUN npm install webpack -g
RUN ["pip", "install", "gunicorn"]

# Install project dependencies - dependency files are added independently so that
# changes to application source code don't trigger a cache invalidation at this step
WORKDIR ${MYDIR}

ADD requirements.txt ${MYDIR}/
RUN ["pip", "install", "-r", "requirements.txt"]

# install portal requirements
WORKDIR ${MYDIR}/portal
ADD portal/package.json ${MYDIR}/portal/package.json
RUN npm install
RUN npm install --only=dev

# Now add the rest of the application source and run webpack
ADD . ${MYDIR}
RUN webpack

WORKDIR ${MYDIR}
CMD ["gunicorn", "--bind", "0.0.0.0:80", "--timeout", "180", "--log-level=debug", "webserver:app"]

{'fraction_non_alphanumeric': 0.1347647327546825, 'fraction_numerical': 0.02055733211512106, 'mean_word_length': 4.6735751295336785, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6973864', 'n_tokens_mistral': 769, 'n_tokens_neox': 706, 'n_words': 238}