<commit_before>FROM buildpack-deps

RUN apt-get update && apt-get install -y curl procps

# remove several traces of debian python
RUN apt-get purge -y python python-minimal python2.7-minimal

RUN mkdir /usr/src/python
WORKDIR /usr/src/python

ENV PYTHON_VERSION 2.7.8

RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
		| tar -xJ --strip-components=1
# skip "test_file2k" thanks to "AssertionError: IOError not raised"
# skip "test_mhlib" because it fails on the hub in "test_listfolders" with "AssertionError: Lists differ: [] != ['deep', 'deep/f1', 'deep/f2',..."
RUN ./configure \
	&& make -j$(nproc) \
	&& make EXTRATESTOPTS='--exclude test_file2k test_mhlib' test \
	&& make install \
	&& make clean

# install "pip", since the vast majority of users of this image will want it
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2

CMD ["python2"]<commit_msg>2: add virtualenv<commit_after>FROM buildpack-deps

RUN apt-get update && apt-get install -y curl procps

# remove several traces of debian python
RUN apt-get purge -y python python-minimal python2.7-minimal

RUN mkdir /usr/src/python
WORKDIR /usr/src/python

ENV PYTHON_VERSION 2.7.8

RUN curl -SL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
		| tar -xJ --strip-components=1
# skip "test_file2k" thanks to "AssertionError: IOError not raised"
# skip "test_mhlib" because it fails on the hub in "test_listfolders" with "AssertionError: Lists differ: [] != ['deep', 'deep/f1', 'deep/f2',..."
RUN ./configure \
	&& make -j$(nproc) \
	&& make EXTRATESTOPTS='--exclude test_file2k test_mhlib' test \
	&& make install \
	&& make clean

# install "pip" and "virtualenv", since the vast majority of users of this image will want it
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2 && pip install virtualenv

CMD ["python2"]
{'fraction_non_alphanumeric': 0.1337916446324696, 'fraction_numerical': 0.013220518244315178, 'mean_word_length': 4.045333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '4252187', 'n_tokens_mistral': 679, 'n_tokens_neox': 650, 'n_words': 200}