You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/01/22 07:36:36 UTC
[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]:
fixed UnicodeDecodeError during python lib installation
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
new 529f82c [DATALAB-2091]: fixed UnicodeDecodeError during python lib installation
529f82c is described below
commit 529f82c5c4baf59609a25bf39802a8f5f30fd185
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Jan 22 09:36:22 2021 +0200
[DATALAB-2091]: fixed UnicodeDecodeError during python lib installation
---
.../src/general/files/gcp/base_Dockerfile | 11 +++++++++++
infrastructure-provisioning/src/general/lib/os/fab.py | 4 ----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile b/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
index a03a840..c1921cd 100644
--- a/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/gcp/base_Dockerfile
@@ -29,6 +29,17 @@ RUN apt-get update && \
apt-get -y install python3-pip python-dev groff vim less git wget nano libssl-dev libffi-dev libffi6 && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+# To cahnge POSIX locale to en_US.UTF-8
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
+
+RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
+ dpkg-reconfigure --frontend=noninteractive locales && \
+ update-locale LANG=en_US.UTF-8
+
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
# Install any python dependencies
RUN python3 -m pip install -UI pip==20.1 && \
python3 -m pip install -U six configparser boto3 backoff fab-classic fabvenv argparse ujson jupyter pycrypto google-api-python-client google-cloud-storage \
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 37fea9a..09d1c26 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -42,10 +42,6 @@ def ensure_pip(requisites):
if not exists('/home/{}/.ensure_dir/pip_path_added'.format(os.environ['conf_os_user'])):
sudo('echo PATH=$PATH:/usr/local/bin/:/opt/spark/bin/ >> /etc/profile')
sudo('echo export PATH >> /etc/profile')
- sudo('update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US:en')
- sudo('locale')
- with settings(warn_only=True):
- reboot(wait=180)
sudo('pip3 install -UI pip=={} --no-cache-dir'.format(os.environ['conf_pip_version']))
sudo('pip3 install --upgrade setuptools')
sudo('pip3 install -UI {} --no-cache-dir'.format(requisites))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org