Update Dockerfile with more precise versions, fix unicode bug
@@ -58,7 +58,8 @@ RUN pip install allennlp==0.5.1
# Install misc util packages
RUN pip install --upgrade google-cloud-logging sendgrid
-RUN pip install python-Levenshtein
+RUN pip install python-Levenshtein ftfy==5.4.1 spacy==2.0.11
+RUN python -m spacy download en
# Install local data files.
RUN python -m nltk.downloader perluniprops nonbreaking_prefixes punkt
@@ -68,6 +69,9 @@ RUN python -m nltk.downloader perluniprops nonbreaking_prefixes punkt
# TODO: see about a workaround if we can install elsewhere in the container.
RUN chmod go+rx /root
+# Fix unicode issues in Python3 by setting default text file encoding.
+ENV LANG C.UTF-8
+
# Create local dir for NFS mount.
RUN mkdir -p /nfs/jsalt
# Set environment vars based on gcp/config/jsalt_paths.1.2.sh
