From: Juha Kosonen Date: Fri, 20 Dec 2019 10:39:51 +0000 (+0200) Subject: Prevent python to write .pyc files on import X-Git-Tag: 3.0.0~21 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F2169%2F1;p=validation.git Prevent python to write .pyc files on import JIRA: VAL-94 Change-Id: I3bf6dd55cb510e2d9a2704369a1bd0599b48eb63 Signed-off-by: Juha Kosonen --- diff --git a/bluval/Dockerfile b/bluval/Dockerfile index 6a49c2f..f01deaa 100644 --- a/bluval/Dockerfile +++ b/bluval/Dockerfile @@ -32,4 +32,4 @@ RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation RUN pip3 install -r /opt/akraino/validation/bluval/requirements.txt WORKDIR /opt/akraino/validation -ENTRYPOINT ["python3", "bluval/blucon.py"] +ENTRYPOINT ["python3", "-B", "bluval/blucon.py"] diff --git a/bluval/blucon.py b/bluval/blucon.py index cea16de..0d5d7ca 100644 --- a/bluval/blucon.py +++ b/bluval/blucon.py @@ -61,7 +61,7 @@ def invoke_docker(bluprint, layer): " akraino/validation:{0}-latest" " /bin/sh -c" " 'cd /opt/akraino/validation " - "&& python bluval/bluval.py -l {0} {1} {2}'" + "&& python -B bluval/bluval.py -l {0} {1} {2}'" .format(layer, ("-o" if _OPTIONAL_ALSO else ""), bluprint)) args = [cmd]