Explorar el Código

Python/* Remove TE dependencies and base files (#3521)

* Python/* Remove TE dependencies and base files

* a few fixes [ci lang-only Python]
Nate hace 7 años
padre
commit
3d39c26538
Se han modificado 72 ficheros con 250 adiciones y 254 borrados
  1. 0 9
      frameworks/Python/aiohttp/aiohttp-base.dockerfile
  2. 6 2
      frameworks/Python/aiohttp/aiohttp-pg-raw.dockerfile
  3. 7 1
      frameworks/Python/aiohttp/aiohttp.dockerfile
  4. 1 1
      frameworks/Python/aiohttp/app/main.py
  5. 1 1
      frameworks/Python/api_hour/aiohttp.web/hello/__init__.py
  6. 0 8
      frameworks/Python/api_hour/aiohttpweb-base.dockerfile
  7. 8 1
      frameworks/Python/api_hour/api_hour-dbs.dockerfile
  8. 8 1
      frameworks/Python/api_hour/api_hour-json.dockerfile
  9. 8 1
      frameworks/Python/api_hour/api_hour-mysql.dockerfile
  10. 8 1
      frameworks/Python/api_hour/api_hour-plaintext.dockerfile
  11. 8 1
      frameworks/Python/api_hour/api_hour.dockerfile
  12. 0 8
      frameworks/Python/api_hour/yocto_http-base.dockerfile
  13. 1 1
      frameworks/Python/api_hour/yocto_http/hello/__init__.py
  14. 2 2
      frameworks/Python/apistar/apistar.dockerfile
  15. 1 1
      frameworks/Python/bottle/app.py
  16. 7 8
      frameworks/Python/bottle/bottle-nginx-uwsgi.dockerfile
  17. 2 2
      frameworks/Python/bottle/bottle-pypy2.dockerfile
  18. 2 2
      frameworks/Python/bottle/bottle-raw.dockerfile
  19. 2 2
      frameworks/Python/bottle/bottle.dockerfile
  20. 2 2
      frameworks/Python/cherrypy/cherrypy-py3.dockerfile
  21. 2 2
      frameworks/Python/cherrypy/cherrypy.dockerfile
  22. 0 7
      frameworks/Python/django/django-base.dockerfile
  23. 7 1
      frameworks/Python/django/django-postgresql.dockerfile
  24. 2 2
      frameworks/Python/django/django-py3.dockerfile
  25. 7 1
      frameworks/Python/django/django.dockerfile
  26. 1 1
      frameworks/Python/django/hello/hello/settings.py
  27. 2 2
      frameworks/Python/falcon/falcon-py3.dockerfile
  28. 2 2
      frameworks/Python/falcon/falcon-pypy2.dockerfile
  29. 2 2
      frameworks/Python/falcon/falcon.dockerfile
  30. 1 1
      frameworks/Python/flask/app.py
  31. 7 8
      frameworks/Python/flask/flask-nginx-uwsgi.dockerfile
  32. 0 7
      frameworks/Python/flask/flask-py3-base.dockerfile
  33. 0 7
      frameworks/Python/flask/flask-pypy2-base.dockerfile
  34. 7 1
      frameworks/Python/flask/flask-pypy2-raw.dockerfile
  35. 7 1
      frameworks/Python/flask/flask-pypy2.dockerfile
  36. 7 1
      frameworks/Python/flask/flask-raw.dockerfile
  37. 7 1
      frameworks/Python/flask/flask.dockerfile
  38. 2 2
      frameworks/Python/japronto/japronto.dockerfile
  39. 2 2
      frameworks/Python/klein/klein.dockerfile
  40. 1 1
      frameworks/Python/morepath/app/run.py
  41. 2 2
      frameworks/Python/morepath/morepath.dockerfile
  42. 2 2
      frameworks/Python/pyramid/pyramid-py2.dockerfile
  43. 2 2
      frameworks/Python/pyramid/pyramid.dockerfile
  44. 2 2
      frameworks/Python/sanic/sanic.dockerfile
  45. 3 3
      frameworks/Python/tornado/tornado-postgresql-raw.dockerfile
  46. 3 3
      frameworks/Python/tornado/tornado-py3.dockerfile
  47. 3 3
      frameworks/Python/tornado/tornado-pypy2.dockerfile
  48. 3 3
      frameworks/Python/tornado/tornado.dockerfile
  49. 1 1
      frameworks/Python/turbogears/app.py
  50. 2 2
      frameworks/Python/turbogears/turbogears.dockerfile
  51. 1 1
      frameworks/Python/uvicorn/app.py
  52. 2 2
      frameworks/Python/uvicorn/uvicorn.dockerfile
  53. 7 8
      frameworks/Python/uwsgi/uwsgi-nginx-uwsgi.dockerfile
  54. 2 2
      frameworks/Python/uwsgi/uwsgi.dockerfile
  55. 1 1
      frameworks/Python/web2py/app/standard/modules/database.py
  56. 0 25
      frameworks/Python/web2py/web2py-base.dockerfile
  57. 25 1
      frameworks/Python/web2py/web2py-optimized.dockerfile
  58. 25 1
      frameworks/Python/web2py/web2py.dockerfile
  59. 1 1
      frameworks/Python/webware/app/Context/DbSession.py
  60. 2 2
      frameworks/Python/webware/webware.dockerfile
  61. 1 1
      frameworks/Python/weppy/app.py
  62. 7 8
      frameworks/Python/weppy/weppy-nginx-uwsgi.dockerfile
  63. 2 2
      frameworks/Python/weppy/weppy-py3.dockerfile
  64. 2 2
      frameworks/Python/weppy/weppy-pypy2.dockerfile
  65. 2 2
      frameworks/Python/weppy/weppy.dockerfile
  66. 1 1
      frameworks/Python/wheezyweb/app.py
  67. 2 2
      frameworks/Python/wheezyweb/wheezyweb-py3.dockerfile
  68. 2 2
      frameworks/Python/wheezyweb/wheezyweb.dockerfile
  69. 2 2
      frameworks/Python/wsgi/wsgi.dockerfile
  70. 0 13
      toolset/setup/docker/languages/pypy2.dockerfile
  71. 0 22
      toolset/setup/docker/languages/python2.dockerfile
  72. 0 23
      toolset/setup/docker/languages/python3.dockerfile

+ 0 - 9
frameworks/Python/aiohttp/aiohttp-base.dockerfile

@@ -1,9 +0,0 @@
-FROM techempower/python3:0.1
-
-ADD ./ /aiohttp
-
-WORKDIR aiohttp
-
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /aiohttp/requirements.txt
-
-CMD gunicorn app.gunicorn:app -c gunicorn_conf.py

+ 6 - 2
frameworks/Python/aiohttp/aiohttp-pg-raw.dockerfile

@@ -1,6 +1,10 @@
-FROM techempower/aiohttp-base:0.1
+FROM python:3.6.5
 
-WORKDIR /aiohttp
+ADD ./ /aiohttp
+
+WORKDIR aiohttp
+
+RUN pip3 install -r /aiohttp/requirements.txt
 
 ENV CONNECTION=RAW
 

+ 7 - 1
frameworks/Python/aiohttp/aiohttp.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/aiohttp-base:0.1
+FROM python:3.6.5
+
+ADD ./ /aiohttp
+
+WORKDIR aiohttp
+
+RUN pip3 install -r /aiohttp/requirements.txt
 
 WORKDIR /aiohttp
 

+ 1 - 1
frameworks/Python/aiohttp/app/main.py

@@ -35,7 +35,7 @@ def pg_dsn() -> str:
     return str(URL(
         database='hello_world',
         password=os.getenv('PGPASS', 'benchmarkdbpass'),
-        host=os.getenv('DBHOST', 'localhost'),
+        host='tfb-database',
         port='5432',
         username=os.getenv('PGUSER', 'benchmarkdbuser'),
         drivername='postgres',

+ 1 - 1
frameworks/Python/api_hour/aiohttp.web/hello/__init__.py

@@ -46,7 +46,7 @@ class Container(api_hour.Container):
         yield from super().start()
         LOG.info('Starting engines...')
         print('Starting engines...')
-        self.engines['pg'] = self.loop.create_task(aiopg.create_pool(host=os.environ.get('DBHOST', self.config['engines']['pg']['host']),
+        self.engines['pg'] = self.loop.create_task(aiopg.create_pool(host='tfb-database',
                                                                      port=int(self.config['engines']['pg']['port']),
                                                                      sslmode='disable',
                                                                      dbname=self.config['engines']['pg']['dbname'],

+ 0 - 8
frameworks/Python/api_hour/aiohttpweb-base.dockerfile

@@ -1,8 +0,0 @@
-FROM techempower/python3:0.1
-
-ADD ./aiohttp.web /aiohttp.web
-ADD ./requirements.txt /aiohttp.web
-
-WORKDIR /aiohttp.web
-
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /aiohttp.web/requirements.txt

+ 8 - 1
frameworks/Python/api_hour/api_hour-dbs.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/yocto_http-base:0.1
+FROM python:3.6.5
+
+ADD ./yocto_http /yocto_http
+ADD ./requirements.txt /yocto_http
+
+WORKDIR /yocto_http
+
+RUN pip3 install -r /yocto_http/requirements.txt
 
 WORKDIR /yocto_http
 

+ 8 - 1
frameworks/Python/api_hour/api_hour-json.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/yocto_http-base:0.1
+FROM python:3.6.5
+
+ADD ./yocto_http /yocto_http
+ADD ./requirements.txt /yocto_http
+
+WORKDIR /yocto_http
+
+RUN pip3 install -r /yocto_http/requirements.txt
 
 WORKDIR /yocto_http
 

+ 8 - 1
frameworks/Python/api_hour/api_hour-mysql.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/aiohttpweb-base:0.1
+FROM python:3.6.5
+
+ADD ./aiohttp.web /aiohttp.web
+ADD ./requirements.txt /aiohttp.web
+
+WORKDIR /aiohttp.web
+
+RUN pip3 install -r /aiohttp.web/requirements.txt
 
 WORKDIR /aiohttp.web
 

+ 8 - 1
frameworks/Python/api_hour/api_hour-plaintext.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/yocto_http-base:0.1
+FROM python:3.6.5
+
+ADD ./yocto_http /yocto_http
+ADD ./requirements.txt /yocto_http
+
+WORKDIR /yocto_http
+
+RUN pip3 install -r /yocto_http/requirements.txt
 
 WORKDIR /yocto_http
 

+ 8 - 1
frameworks/Python/api_hour/api_hour.dockerfile

@@ -1,4 +1,11 @@
-FROM techempower/aiohttpweb-base:0.1
+FROM python:3.6.5
+
+ADD ./aiohttp.web /aiohttp.web
+ADD ./requirements.txt /aiohttp.web
+
+WORKDIR /aiohttp.web
+
+RUN pip3 install -r /aiohttp.web/requirements.txt
 
 WORKDIR /aiohttp.web
 

+ 0 - 8
frameworks/Python/api_hour/yocto_http-base.dockerfile

@@ -1,8 +0,0 @@
-FROM techempower/python3:0.1
-
-ADD ./yocto_http /yocto_http
-ADD ./requirements.txt /yocto_http
-
-WORKDIR /yocto_http
-
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /yocto_http/requirements.txt

+ 1 - 1
frameworks/Python/api_hour/yocto_http/hello/__init__.py

@@ -35,7 +35,7 @@ class Container(api_hour.Container):
     def start(self):
         yield from super().start()
         LOG.info('Starting engines...')
-        self.engines['pg'] = self.loop.create_task(aiopg.create_pool(host=os.environ.get('DBHOST', self.config['engines']['pg']['host']),
+        self.engines['pg'] = self.loop.create_task(aiopg.create_pool(host='tfb-database',
                                                                      port=int(self.config['engines']['pg']['port']),
                                                                      sslmode='disable',
                                                                      dbname=self.config['engines']['pg']['dbname'],

+ 2 - 2
frameworks/Python/apistar/apistar.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /apistar
 
 WORKDIR /apistar
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /apistar/requirements.txt
+RUN pip3 install -r /apistar/requirements.txt
 
 CMD gunicorn app:app.wsgi -c gunicorn_conf.py

+ 1 - 1
frameworks/Python/bottle/app.py

@@ -20,7 +20,7 @@ if sys.version_info[0] == 3:
 _is_pypy = hasattr(sys, 'pypy_version_info')
 
 DBDRIVER = 'mysql+pymysql' if _is_pypy else 'mysql'
-DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
+DBHOSTNAME = 'tfb-database'
 DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
 
 app = Bottle()

+ 7 - 8
frameworks/Python/bottle/bottle-nginx-uwsgi.dockerfile

@@ -1,18 +1,17 @@
-FROM techempower/nginx:0.1
+FROM python:3.6.5
 
-FROM techempower/python3:0.1
+RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
+RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
+RUN echo "deb-src http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
 
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /bottle
 
 WORKDIR /bottle
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt
+RUN pip3 install -r /bottle/requirements.txt
 
-RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /bottle/nginx.conf
+RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /bottle/nginx.conf
 
 CMD nginx -c /bottle/nginx.conf && uwsgi --ini /bottle/uwsgi.ini --processes $(($(nproc)*3)) --wsgi app:app

+ 2 - 2
frameworks/Python/bottle/bottle-pypy2.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/pypy2:0.1
+FROM pypy:2-5.10
 
 ADD ./ /bottle
 
 WORKDIR /bottle
 
-RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /bottle/requirements-pypy.txt
+RUN pip install -r /bottle/requirements-pypy.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/bottle/bottle-raw.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /bottle
 
 WORKDIR /bottle
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt
+RUN pip3 install -r /bottle/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/bottle/bottle.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /bottle
 
 WORKDIR /bottle
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /bottle/requirements.txt
+RUN pip3 install -r /bottle/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/cherrypy/cherrypy-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /cherrypy
 
 WORKDIR /cherrypy
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /cherrypy/requirements.txt
+RUN pip3 install -r /cherrypy/requirements.txt
 
 CMD python3 app.py

+ 2 - 2
frameworks/Python/cherrypy/cherrypy.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /cherrypy
 
 WORKDIR /cherrypy
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /cherrypy/requirements.txt
+RUN pip install -r /cherrypy/requirements.txt
 
 CMD python app.py

+ 0 - 7
frameworks/Python/django/django-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/python2:0.1
-
-ADD ./ /django
-
-WORKDIR /django
-
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /django/requirements.txt

+ 7 - 1
frameworks/Python/django/django-postgresql.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/django-base:0.1
+FROM python:2.7.14
+
+ADD ./ /django
+
+WORKDIR /django
+
+RUN pip install -r /django/requirements.txt
 
 WORKDIR /django
 

+ 2 - 2
frameworks/Python/django/django-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /django
 
 WORKDIR /django
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /django/requirements_py3.txt
+RUN pip3 install -r /django/requirements_py3.txt
 
 CMD gunicorn --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql

+ 7 - 1
frameworks/Python/django/django.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/django-base:0.1
+FROM python:2.7.14
+
+ADD ./ /django
+
+WORKDIR /django
+
+RUN pip install -r /django/requirements.txt
 
 WORKDIR /django
 

+ 1 - 1
frameworks/Python/django/hello/hello/settings.py

@@ -17,7 +17,7 @@ DATABASES = {
         'NAME': 'hello_world',           # Or path to database file if using sqlite3.
         'USER': 'benchmarkdbuser',       # Not used with sqlite3.
         'PASSWORD': 'benchmarkdbpass',   # Not used with sqlite3.
-        'HOST': os.environ.get('DBHOST', ''),  # Set to empty string for localhost. Not used with sqlite3.
+        'HOST': 'tfb-database',  # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
         'CONN_MAX_AGE': 30,
     }

+ 2 - 2
frameworks/Python/falcon/falcon-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /falcon
 
 WORKDIR /falcon
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /falcon/requirements.lock
+RUN pip3 install -r /falcon/requirements.lock
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/falcon/falcon-pypy2.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/pypy2:0.1
+FROM pypy:2-5.10
 
 ADD ./ /falcon
 
 WORKDIR /falcon
 
-RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /falcon/requirements-pypy.lock
+RUN pip install -r /falcon/requirements-pypy.lock
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/falcon/falcon.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /falcon
 
 WORKDIR /falcon
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /falcon/requirements.lock
+RUN pip install -r /falcon/requirements.lock
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 1 - 1
frameworks/Python/flask/app.py

@@ -18,7 +18,7 @@ if sys.version_info[0] == 3:
 _is_pypy = hasattr(sys, 'pypy_version_info')
 
 DBDRIVER = 'mysql+pymysql' if _is_pypy else 'mysql'  # mysqlclient is slow on PyPy
-DBHOST = os.environ.get('DBHOST', 'localhost')
+DBHOST = 'tfb-database'
 
 
 # setup

+ 7 - 8
frameworks/Python/flask/flask-nginx-uwsgi.dockerfile

@@ -1,18 +1,17 @@
-FROM techempower/nginx:0.1
+FROM python:3.6.5
 
-FROM techempower/python3:0.1
+RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
+RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
+RUN echo "deb-src http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
 
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /flask
 
 WORKDIR /flask
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /flask/requirements.txt
+RUN pip3 install -r /flask/requirements.txt
 
-RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /flask/nginx.conf
+RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /flask/nginx.conf
 
 CMD nginx -c /flask/nginx.conf && uwsgi --ini /flask/uwsgi.ini --processes $(($(nproc)*3)) --wsgi app:app

+ 0 - 7
frameworks/Python/flask/flask-py3-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/python3:0.1
-
-ADD ./ /flask
-
-WORKDIR /flask
-
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /flask/requirements.txt

+ 0 - 7
frameworks/Python/flask/flask-pypy2-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/pypy2:0.1
-
-ADD ./ /flask
-
-WORKDIR /flask
-
-RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /flask/requirements-pypy.txt

+ 7 - 1
frameworks/Python/flask/flask-pypy2-raw.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/flask-pypy2-base:0.1
+FROM pypy:2-5.10
+
+ADD ./ /flask
+
+WORKDIR /flask
+
+RUN pip install -r /flask/requirements-pypy.txt
 
 WORKDIR /flask
 

+ 7 - 1
frameworks/Python/flask/flask-pypy2.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/flask-pypy2-base:0.1
+FROM pypy:2-5.10
+
+ADD ./ /flask
+
+WORKDIR /flask
+
+RUN pip install -r /flask/requirements-pypy.txt
 
 WORKDIR /flask
 

+ 7 - 1
frameworks/Python/flask/flask-raw.dockerfile

@@ -1,4 +1,10 @@
-FROM techempower/flask-py3-base:0.1
+FROM python:3.6.5
+
+ADD ./ /flask
+
+WORKDIR /flask
+
+RUN pip3 install -r /flask/requirements.txt
 
 WORKDIR /flask
 

+ 7 - 1
frameworks/Python/flask/flask.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/flask-py3-base:0.1
+FROM python:3.6.5
+
+ADD ./ /flask
+
+WORKDIR /flask
+
+RUN pip3 install -r /flask/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/japronto/japronto.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /japronto
 
 WORKDIR /japronto
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /japronto/requirements.txt
+RUN pip3 install -r /japronto/requirements.txt
 
 CMD python3 app.py

+ 2 - 2
frameworks/Python/klein/klein.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /klein
 
 WORKDIR /klein
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /klein/requirements.txt
+RUN pip install -r /klein/requirements.txt
 
 CMD python app.py

+ 1 - 1
frameworks/Python/morepath/app/run.py

@@ -7,7 +7,7 @@ from .model import db
 
 
 def setup_db():
-    DBHOST = os.environ.get('DBHOST', 'localhost')
+    DBHOST = 'tfb-database'
 
     db.bind(
         'postgres',

+ 2 - 2
frameworks/Python/morepath/morepath.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /japronto
 
 WORKDIR /japronto
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /japronto/requirements.txt
+RUN pip3 install -r /japronto/requirements.txt
 
 CMD gunicorn app.run -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/pyramid/pyramid-py2.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /pyramid
 
 WORKDIR /pyramid
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /pyramid/requirements.txt
+RUN pip install -r /pyramid/requirements.txt
 
 CMD gunicorn wsgi:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/pyramid/pyramid.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /pyramid
 
 WORKDIR /pyramid
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /pyramid/requirements.txt
+RUN pip3 install -r /pyramid/requirements.txt
 
 CMD gunicorn wsgi:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/sanic/sanic.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /sanic
 
 WORKDIR /sanic
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /sanic/requirements.txt
+RUN pip3 install -r /sanic/requirements.txt
 
 CMD python3 app.py

+ 3 - 3
frameworks/Python/tornado/tornado-postgresql-raw.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /tornado
 
 WORKDIR /tornado
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /tornado/requirements_pg.txt
+RUN pip install -r /tornado/requirements_pg.txt
 
-CMD python server_pg.py --port=8080 --postgres=$DBHOST --logging=error
+CMD python server_pg.py --port=8080 --postgres=tfb-database --logging=error

+ 3 - 3
frameworks/Python/tornado/tornado-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /pyramid
 
 WORKDIR /pyramid
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /pyramid/requirements_mongo.txt
+RUN pip3 install -r /pyramid/requirements_mongo.txt
 
-CMD python3 server_py3.py --port=8080 --mongo=$DBHOST --logging=error
+CMD python3 server_py3.py --port=8080 --mongo=tfb-database --logging=error

+ 3 - 3
frameworks/Python/tornado/tornado-pypy2.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/pypy2:0.1
+FROM pypy:2-5.10
 
 ADD ./ /tornado
 
 WORKDIR /tornado
 
-RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /tornado/requirements_mongo.txt
+RUN pip install -r /tornado/requirements_mongo.txt
 
-CMD pypy server_py2.py --port=8080 --mongo=$DBHOST --logging=error
+CMD pypy server_py2.py --port=8080 --mongo=tfb-database --logging=error

+ 3 - 3
frameworks/Python/tornado/tornado.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /tornado
 
 WORKDIR /tornado
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /tornado/requirements_mongo.txt
+RUN pip install -r /tornado/requirements_mongo.txt
 
-CMD python server_py2.py --port=8080 --mongo=$DBHOST --logging=error
+CMD python server_py2.py --port=8080 --mongo=tfb-database --logging=error

+ 1 - 1
frameworks/Python/turbogears/app.py

@@ -15,7 +15,7 @@ from models.World import World
 
 
 DBDRIVER = 'mysql'
-DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
+DBHOSTNAME = 'tfb-database'
 DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
 
 db_engine = create_engine(DATABASE_URI)

+ 2 - 2
frameworks/Python/turbogears/turbogears.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /turbogears
 
 WORKDIR /turbogears
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /turbogears/requirements.txt
+RUN pip install -r /turbogears/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 1 - 1
frameworks/Python/uvicorn/app.py

@@ -15,7 +15,7 @@ async def setup():
         user=os.getenv('PGUSER', 'benchmarkdbuser'),
         password=os.getenv('PGPASS', 'benchmarkdbpass'),
         database='hello_world',
-        host=os.getenv('DBHOST', 'localhost'),
+        host='tfb-database',
         port=5432
     )
 

+ 2 - 2
frameworks/Python/uvicorn/uvicorn.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /uvicorn
 
 WORKDIR /uvicorn
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /uvicorn/requirements.txt
+RUN pip3 install -r /uvicorn/requirements.txt
 
 CMD uvicorn app:main -c uvicorn_conf.py

+ 7 - 8
frameworks/Python/uwsgi/uwsgi-nginx-uwsgi.dockerfile

@@ -1,18 +1,17 @@
-FROM techempower/nginx:0.1
+FROM python:2.7.14
 
-FROM techempower/python2:0.1
+RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
+RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
+RUN echo "deb-src http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
 
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /uw
 
 WORKDIR /uw
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /uw/requirements.txt
+RUN pip install -r /uw/requirements.txt
 
-RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /uw/nginx.conf
+RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /uw/nginx.conf
 
 CMD nginx -c /uw/nginx.conf && uwsgi --ini uwsgi.ini --processes $(nproc) --gevent 1000 --wsgi hello

+ 2 - 2
frameworks/Python/uwsgi/uwsgi.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /uw
 
 WORKDIR /uw
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /uw/requirements.txt
+RUN pip install -r /uw/requirements.txt
 
 CMD uwsgi --master -L -l 5000 --gevent 1000 --http :8080 --http-keepalive --http-processes $(nproc) -p $(nproc) -w hello --add-header "Connection: keep-alive" --pidfile /tmp/uwsgi.pid

+ 1 - 1
frameworks/Python/web2py/app/standard/modules/database.py

@@ -4,7 +4,7 @@ from operator import itemgetter
 from gluon.storage import Storage
 from gluon.dal import DAL, Field, Row
 
-DBHOST = os.environ.get('DBHOST', 'localhost')
+DBHOST = 'tfb-database'
 DATABASE_URI = 'mysql://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world' % DBHOST
 
 class Dal(object):

+ 0 - 25
frameworks/Python/web2py/web2py-base.dockerfile

@@ -1,25 +0,0 @@
-FROM techempower/python2:0.1
-
-ADD ./ /web2py
-
-WORKDIR /web2py
-
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /web2py/requirements.txt
-
-RUN git clone --recursive --branch master https://github.com/web2py/web2py.git
-
-WORKDIR /web2py/web2py
-
-# The following commit is checked out in order to take advantage of several
-# bug fixes that were made after the latest stable release. This can be changed
-# in future rounds once a new stable release has been made.
-RUN git checkout 623f3b99477eb97ffadb20d6f7cb3da398253c9c
-
-WORKDIR /web2py
-
-RUN cp -r app/standard/ web2py/applications/
-RUN cp -r app/optimized/ web2py/applications/
-RUN cp app/wsgi.py web2py/
-RUN cp app/routes.py web2py/
-RUN touch web2py/__init__.py
-RUN python compile_apps.py

+ 25 - 1
frameworks/Python/web2py/web2py-optimized.dockerfile

@@ -1,4 +1,28 @@
-FROM techempower/web2py-base:0.1
+FROM python:2.7.14
+
+ADD ./ /web2py
+
+WORKDIR /web2py
+
+RUN pip install -r /web2py/requirements.txt
+
+RUN git clone --recursive --branch master https://github.com/web2py/web2py.git
+
+WORKDIR /web2py/web2py
+
+# The following commit is checked out in order to take advantage of several
+# bug fixes that were made after the latest stable release. This can be changed
+# in future rounds once a new stable release has been made.
+RUN git checkout 623f3b99477eb97ffadb20d6f7cb3da398253c9c
+
+WORKDIR /web2py
+
+RUN cp -r app/standard/ web2py/applications/
+RUN cp -r app/optimized/ web2py/applications/
+RUN cp app/wsgi.py web2py/
+RUN cp app/routes.py web2py/
+RUN touch web2py/__init__.py
+RUN python compile_apps.py
 
 WORKDIR /web2py
 

+ 25 - 1
frameworks/Python/web2py/web2py.dockerfile

@@ -1,4 +1,28 @@
-FROM techempower/web2py-base:0.1
+FROM python:2.7.14
+
+ADD ./ /web2py
+
+WORKDIR /web2py
+
+RUN pip install -r /web2py/requirements.txt
+
+RUN git clone --recursive --branch master https://github.com/web2py/web2py.git
+
+WORKDIR /web2py/web2py
+
+# The following commit is checked out in order to take advantage of several
+# bug fixes that were made after the latest stable release. This can be changed
+# in future rounds once a new stable release has been made.
+RUN git checkout 623f3b99477eb97ffadb20d6f7cb3da398253c9c
+
+WORKDIR /web2py
+
+RUN cp -r app/standard/ web2py/applications/
+RUN cp -r app/optimized/ web2py/applications/
+RUN cp app/wsgi.py web2py/
+RUN cp app/routes.py web2py/
+RUN touch web2py/__init__.py
+RUN python compile_apps.py
 
 WORKDIR /web2py
 

+ 1 - 1
frameworks/Python/webware/app/Context/DbSession.py

@@ -5,7 +5,7 @@ from sqlalchemy import create_engine
 from sqlalchemy.orm import sessionmaker
 
 DBDRIVER = 'mysql'
-DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
+DBHOSTNAME = 'tfb-database'
 DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
 
 class Database():

+ 2 - 2
frameworks/Python/webware/webware.dockerfile

@@ -1,10 +1,10 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /webware
 
 WORKDIR /webware
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /webware/requirements.txt
+RUN pip install -r /webware/requirements.txt
 
 RUN wget -q https://downloads.sourceforge.net/webware/Webware-1.1.1.tar.gz
 RUN tar xf Webware-1.1.1.tar.gz

+ 1 - 1
frameworks/Python/weppy/app.py

@@ -10,7 +10,7 @@ _is_pypy = hasattr(sys, 'pypy_version_info')
 if sys.version_info[0] == 3:
     xrange = range
 
-DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
+DBHOSTNAME = 'tfb-database'
 
 app = App(__name__)
 

+ 7 - 8
frameworks/Python/weppy/weppy-nginx-uwsgi.dockerfile

@@ -1,18 +1,17 @@
-FROM techempower/nginx:0.1
+FROM python:2.7.14
 
-FROM techempower/python2:0.1
+RUN curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
+RUN echo "deb http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
+RUN echo "deb-src http://nginx.org/packages/debian/ jessie nginx" >> /etc/apt/sources.list
 
-COPY --from=0 /nginx /nginx
-
-ENV NGINX_HOME="/nginx"
-ENV PATH=/nginx/sbin:${PATH}
+RUN apt update -yqq && apt install -yqq nginx
 
 ADD ./ /weppy
 
 WORKDIR /weppy
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /weppy/requirements.txt
+RUN pip install -r /weppy/requirements.txt
 
-RUN sed -i 's|include .*/conf/uwsgi_params;|include '"${NGINX_HOME}"'/conf/uwsgi_params;|g' /weppy/nginx.conf
+RUN sed -i 's|include .*/conf/uwsgi_params;|include /etc/nginx/uwsgi_params;|g' /weppy/nginx.conf
 
 CMD nginx -c /weppy/nginx.conf && uwsgi --ini /weppy/uwsgi.ini --processes $(nproc) --wsgi app:app

+ 2 - 2
frameworks/Python/weppy/weppy-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /weppy
 
 WORKDIR /weppy
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /weppy/requirements.txt
+RUN pip3 install -r /weppy/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/weppy/weppy-pypy2.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/pypy2:0.1
+FROM pypy:2-5.10
 
 ADD ./ /weppy
 
 WORKDIR /weppy
 
-RUN pip install --install-option="--prefix=${PYPY2_ROOT}" -r /weppy/requirements-pypy.txt
+RUN pip install -r /weppy/requirements-pypy.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/weppy/weppy.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /weppy
 
 WORKDIR /weppy
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /weppy/requirements.txt
+RUN pip install -r /weppy/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 1 - 1
frameworks/Python/wheezyweb/app.py

@@ -24,7 +24,7 @@ from sqlalchemy.orm import sessionmaker
 from meinheld import server
 
 DBDRIVER = 'mysql'
-DBHOSTNAME = os.environ.get('DBHOST', 'localhost')
+DBHOSTNAME = 'tfb-database'
 DATABASE_URI = '%s://benchmarkdbuser:benchmarkdbpass@%s:3306/hello_world?charset=utf8' % (DBDRIVER, DBHOSTNAME)
 
 Base = declarative_base()

+ 2 - 2
frameworks/Python/wheezyweb/wheezyweb-py3.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /wheezyweb
 
 WORKDIR /wheezyweb
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /wheezyweb/requirements.txt
+RUN pip3 install -r /wheezyweb/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/wheezyweb/wheezyweb.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python2:0.1
+FROM python:2.7.14
 
 ADD ./ /wheezyweb
 
 WORKDIR /wheezyweb
 
-RUN pip install --install-option="--prefix=${PY2_ROOT}" -r /wheezyweb/requirements.txt
+RUN pip install -r /wheezyweb/requirements.txt
 
 CMD gunicorn app:app -c gunicorn_conf.py

+ 2 - 2
frameworks/Python/wsgi/wsgi.dockerfile

@@ -1,9 +1,9 @@
-FROM techempower/python3:0.1
+FROM python:3.6.5
 
 ADD ./ /wsgi
 
 WORKDIR /wsgi
 
-RUN pip3 install --install-option="--prefix=${PY3_ROOT}" -r /wsgi/requirements.txt
+RUN pip3 install -r /wsgi/requirements.txt
 
 CMD gunicorn hello:app -c gunicorn_conf.py

+ 0 - 13
toolset/setup/docker/languages/pypy2.dockerfile

@@ -1,13 +0,0 @@
-FROM techempower/base:0.1
-  
-ENV PYPY2_ROOT=/pypy2
-ENV PYTHONHOME=${PYPY2_ROOT}
-ENV PYPY2_VERSION=5.10.0
-ENV PATH=${PYPY2_ROOT}/bin:${PATH}
-
-RUN wget -q https://bitbucket.org/pypy/pypy/downloads/pypy2-v${PYPY2_VERSION}-linux64.tar.bz2
-RUN tar xf pypy2-v${PYPY2_VERSION}-linux64.tar.bz2
-RUN mv pypy2-v${PYPY2_VERSION}-linux64 $PYPY2_ROOT
-
-RUN pypy -m ensurepip
-RUN pip install -U pip setuptools wheel

+ 0 - 22
toolset/setup/docker/languages/python2.dockerfile

@@ -1,22 +0,0 @@
-FROM techempower/base:0.1
-  
-ENV PY2_ROOT=/py2
-ENV PYTHONHOME=${PY2_ROOT}
-ENV PY2_VERSION=2.7.14
-ENV PATH=${PY2_ROOT}/bin:${PATH}
-
-RUN mkdir $PY2_ROOT
-
-RUN wget -q http://www.python.org/ftp/python/${PY2_VERSION}/Python-${PY2_VERSION}.tar.xz
-RUN tar xf Python-${PY2_VERSION}.tar.xz
-
-WORKDIR Python-${PY2_VERSION}
-
-RUN ./configure --prefix=$PY2_ROOT --disable-shared --with-computed-gotos --quiet
-RUN make -j4 --quiet 2>&1 | tee python2-install.log | awk '{ if (NR%100 == 0) printf "."}'
-RUN make install --quiet 2>&1 | tee -a python2-install.log | awk '{ if (NR%100 == 0) printf "."}'
-
-WORKDIR /py2
-
-RUN python -m ensurepip -U
-RUN pip install -U setuptools pip wheel

+ 0 - 23
toolset/setup/docker/languages/python3.dockerfile

@@ -1,23 +0,0 @@
-FROM techempower/base:0.1
-  
-ENV PY3_ROOT=/py3
-ENV PYTHONHOME=${PY3_ROOT}
-ENV PY3_VERSION=3.6.4
-ENV PATH=${PY3_ROOT}/bin:${PATH}
-
-RUN mkdir py3
-
-RUN wget -q http://www.python.org/ftp/python/${PY3_VERSION}/Python-${PY3_VERSION}.tar.xz
-RUN tar xf Python-${PY3_VERSION}.tar.xz
-
-WORKDIR Python-${PY3_VERSION}
-
-RUN ./configure --prefix=$PY3_ROOT --disable-shared --with-computed-gotos --quiet
-RUN make -j4 --quiet 2>&1 | tee python3-install.log | awk '{ if (NR%100 == 0) printf "."}'
-RUN make install --quiet 2>&1 | tee -a python3-install.log | awk '{ if (NR%100 == 0) printf "."}'
-
-WORKDIR /py3
-
-
-RUN python3 -m ensurepip -U
-RUN pip3 install -U setuptools pip wheel