diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 35b355ba..00000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM gnes/build-base:latest AS dependency - -WORKDIR /gnes/ - -COPY setup.py ./setup.py - -RUN python -c "import distutils.core;s=distutils.core.run_setup('setup.py').install_requires;f=open('requirements_tmp.txt', 'w');[f.write(v+'\n') for v in s];f.close()" && cat requirements_tmp.txt - -RUN pip --no-cache-dir install -r requirements_tmp.txt - -FROM dependency as base - -ADD . ./ - - -RUN pip --no-cache-dir install .[all] \ - && rm -rf /tmp/* - -WORKDIR / - -ENTRYPOINT ["gnes"] \ No newline at end of file diff --git a/Dockerfiles/alpine.Dockerfile b/Dockerfiles/alpine.Dockerfile index 7ec93487..83e0ff5b 100644 --- a/Dockerfiles/alpine.Dockerfile +++ b/Dockerfiles/alpine.Dockerfile @@ -10,7 +10,7 @@ RUN apk add --no-cache \ musl-dev python3-dev py-pgen cython openblas-dev && \ apk add --no-cache libstdc++ openblas libzmq && \ ln -s locale.h /usr/include/xlocale.h && \ - pip install . --no-cache-dir --compile && \ + pip install .[http] --no-cache-dir --compile && \ find /usr/lib/python3.7/ -name 'tests' -exec rm -r '{}' + && \ find /usr/lib/python3.7/site-packages/ -name '*.so' -print -exec sh -c 'file "{}" | grep -q "not stripped" && strip -s "{}"' \; && \ rm /usr/include/xlocale.h && \ diff --git a/Dockerfiles/buster.Dockerfile b/Dockerfiles/buster.Dockerfile index b68a67c2..34954209 100644 --- a/Dockerfiles/buster.Dockerfile +++ b/Dockerfiles/buster.Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential \ python3-dev libopenblas-dev && \ ln -s locale.h /usr/include/xlocale.h && \ - pip install . --no-cache-dir --compile && \ + pip install .[http] --no-cache-dir --compile && \ rm -rf /tmp/* && rm -rf /gnes && \ apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && \ rm /usr/include/xlocale.h diff --git a/Dockerfiles/ubuntu.Dockerfile b/Dockerfiles/ubuntu.Dockerfile index 0d6e51cd..78ba2c8c 100644 --- a/Dockerfiles/ubuntu.Dockerfile +++ b/Dockerfiles/ubuntu.Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential python3-dev python3-pip python3-setuptools libopenblas-dev && \ export LC_ALL=en_US.UTF-8 && export LANG=en_US.UTF-8 && export LC_CTYPE=en_US.UTF-8 && \ ln -s /usr/bin/python3 python && \ - pip3 install . --no-cache-dir --compile && \ + pip3 install .[http] --no-cache-dir --compile && \ rm -rf /tmp/* && rm -rf /gnes && \ apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* diff --git a/gnes/cli/parser.py b/gnes/cli/parser.py index 63ea53c9..b1528793 100644 --- a/gnes/cli/parser.py +++ b/gnes/cli/parser.py @@ -87,7 +87,7 @@ def set_composer_parser(parser=None): parser.add_argument('--mermaid_leftright', action='store_true', default=False, help='showing the flow in left-to-right manner rather than top down') parser.add_argument('--docker_img', type=str, - default='gnes/gnes:latest', + default='gnes/gnes:alpine-latest', help='the docker image used in Docker Swarm & Kubernetes') return parser diff --git a/gnes/composer/flask.py b/gnes/composer/flask.py index 13f47aa4..2a2e34ef 100644 --- a/gnes/composer/flask.py +++ b/gnes/composer/flask.py @@ -27,7 +27,6 @@ def __init__(self, args): def _create_flask_app(self): try: from flask import Flask, request - from flask_compress import Compress except ImportError: raise ImportError('Flask or its dependencies are not fully installed, ' 'they are required for serving HTTP requests.' @@ -69,7 +68,6 @@ def _regenerate(): self.logger.error(e) return '