Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up fails with: ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly #77

Closed
feoh opened this issue Jun 16, 2020 · 7 comments

Comments

@feoh
Copy link

feoh commented Jun 16, 2020

Hi there when I try to deploy contextualize on Ubuntu server 20.04 on my raspberry pi 4 I get:

ubuntu@ubuntu:/nashome/householdpi/contextualize-docker-configs/contextualise$ sudo docker-compose up 
Building web
Step 1/10 : FROM python:3
 ---> 5c4a0c85ac40
Step 2/10 : LABEL   app.name="Contextualise"   app.description="A simple and flexible tool particularly suited for organising information-heavy projects and activities consisting of unstructured and widely diverse data and information resources"   app.license="MIT License"   app.license.url="https://github.com/brettkromkamp/contextualise/blob/master/LICENSE"   app.repo.url="https://github.com/brettkromkamp/contextualise"   app.authors="Brett Kromkamp <@brettkromkamp>"
 ---> Using cache
 ---> af50285641f9
Step 3/10 : WORKDIR /usr/src/app
 ---> Using cache
 ---> edde41d20f83
Step 4/10 : COPY ./requirements.txt ./
 ---> Using cache
 ---> 949b2c8efeea
Step 5/10 : RUN pip install --user git+https://github.com/brettkromkamp/topic-db.git  && pip install --user -r requirements.txt
 ---> Running in 0a0b1d338793
Collecting git+https://github.com/brettkromkamp/topic-db.git
  Cloning https://github.com/brettkromkamp/topic-db.git to /tmp/pip-req-build-7adq7_mn
  Running command git clone -q https://github.com/brettkromkamp/topic-db.git /tmp/pip-req-build-7adq7_mn
Collecting psycopg2
  Downloading psycopg2-2.8.5.tar.gz (380 kB)
Collecting memory-profiler
  Downloading memory_profiler-0.57.0.tar.gz (34 kB)
Collecting python-slugify
  Downloading python-slugify-4.0.0.tar.gz (8.8 kB)
Collecting pytest
  Downloading pytest-5.4.3-py3-none-any.whl (248 kB)
Collecting mypy
  Downloading mypy-0.780-py3-none-any.whl (1.8 MB)
Collecting typed-tree
  Downloading typed_tree-1.0.3-py3-none-any.whl (6.7 kB)
Collecting psutil
  Downloading psutil-5.7.0.tar.gz (449 kB)
Collecting text-unidecode>=1.3
  Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
Collecting pluggy<1.0,>=0.12
  Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting py>=1.5.0
  Downloading py-1.8.2-py2.py3-none-any.whl (83 kB)
Collecting more-itertools>=4.0.0
  Downloading more_itertools-8.4.0-py3-none-any.whl (43 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.4-py2.py3-none-any.whl (30 kB)
Collecting attrs>=17.4.0
  Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting packaging
  Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
Collecting typed-ast<1.5.0,>=1.4.0
  Downloading typed_ast-1.4.1.tar.gz (208 kB)
Collecting mypy-extensions<0.5.0,>=0.4.3
  Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting typing-extensions>=3.7.4
  Downloading typing_extensions-3.7.4.2-py3-none-any.whl (22 kB)
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Building wheels for collected packages: topic-db, psycopg2, memory-profiler, python-slugify, psutil, typed-ast
  Building wheel for topic-db (setup.py): started
  Building wheel for topic-db (setup.py): finished with status 'done'
  Created wheel for topic-db: filename=topic_db-1.0.0-py3-none-any.whl size=26927 sha256=5e5e25e1263a561588c6d6f47882f908459a84378a748d188eddd3ab13c768e1
  Stored in directory: /tmp/pip-ephem-wheel-cache-w2kz4ph9/wheels/fc/01/f3/7037d8d3eaf8c7da0ca818e7540d2e1fa4aa85c0bcd8f8c3c4
  Building wheel for psycopg2 (setup.py): started
  Building wheel for psycopg2 (setup.py): finished with status 'done'
  Created wheel for psycopg2: filename=psycopg2-2.8.5-cp38-cp38-linux_aarch64.whl size=502398 sha256=a446adc6cefa12124ea54927d3df604ebba9201ea60c6461b696cc68cb1503dc
  Stored in directory: /root/.cache/pip/wheels/35/64/21/9c9e2c1bb9cd6bca3c1b97b955615e37fd309f8e8b0b9fdf1a
  Building wheel for memory-profiler (setup.py): started
  Building wheel for memory-profiler (setup.py): finished with status 'done'
  Created wheel for memory-profiler: filename=memory_profiler-0.57.0-py3-none-any.whl size=28992 sha256=59ed6ee0f4f38a1e7ab2dd65cce435c7ff8e3d33de60814f29d18e9cdf49c983
  Stored in directory: /root/.cache/pip/wheels/24/2a/aa/41c20a5e40e527e894031ae00a70366c1aa884b89f6326a9d6
  Building wheel for python-slugify (setup.py): started
  Building wheel for python-slugify (setup.py): finished with status 'done'
  Created wheel for python-slugify: filename=python_slugify-4.0.0-py2.py3-none-any.whl size=5486 sha256=91c02cb96b8b775caa4af5a45edada0a8f1b7d4d2081e979bfad21320400efcc
  Stored in directory: /root/.cache/pip/wheels/f7/2d/24/7c629dd27a06a60618e6af1004e5667d4e38a1e914493ba72d
  Building wheel for psutil (setup.py): started
  Building wheel for psutil (setup.py): finished with status 'done'
  Created wheel for psutil: filename=psutil-5.7.0-cp38-cp38-linux_aarch64.whl size=282127 sha256=2d8b4c5af751dc65a458ad24fc3734547f4ee6bb21b3dcc3d65a31e09a8c2f37
  Stored in directory: /root/.cache/pip/wheels/90/c9/b6/04665702b01dbd9ee92a05e834b627948ed01cdd482e6a78e1
  Building wheel for typed-ast (setup.py): started
  Building wheel for typed-ast (setup.py): finished with status 'done'
  Created wheel for typed-ast: filename=typed_ast-1.4.1-cp38-cp38-linux_aarch64.whl size=909473 sha256=3deb155992fc0fec06328971c1745be522f25cf327c669f4d31a6c549b33b9f0
  Stored in directory: /root/.cache/pip/wheels/90/d4/0c/d1e5fbaba4f3eef9ced2a95737b027aca1a5ea7e52e490f3b2
Successfully built topic-db psycopg2 memory-profiler python-slugify psutil typed-ast
Installing collected packages: psycopg2, psutil, memory-profiler, text-unidecode, python-slugify, pluggy, py, more-itertools, wcwidth, attrs, six, pyparsing, packaging, pytest, typed-ast, mypy-extensions, typing-extensions, mypy, typed-tree, topic-db
  WARNING: The script mprof is installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script slugify is installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts py.test and pytest are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts dmypy, mypy, stubgen and stubtest are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed attrs-19.3.0 memory-profiler-0.57.0 more-itertools-8.4.0 mypy-0.780 mypy-extensions-0.4.3 packaging-20.4 pluggy-0.13.1 psutil-5.7.0 psycopg2-2.8.5 py-1.8.2 pyparsing-2.4.7 pytest-5.4.3 python-slugify-4.0.0 six-1.15.0 text-unidecode-1.3 topic-db-1.0.0 typed-ast-1.4.1 typed-tree-1.0.3 typing-extensions-3.7.4.2 wcwidth-0.2.4
Requirement already satisfied: topic-db>=1.0.0 in /root/.local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (1.0.0)
Collecting SQLAlchemy>=1.3.17
  Downloading SQLAlchemy-1.3.17.tar.gz (6.0 MB)
Collecting Flask>=1.1.2
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting Flask-SQLAlchemy>=2.4.3
  Downloading Flask_SQLAlchemy-2.4.3-py2.py3-none-any.whl (17 kB)
Collecting Flask-Security-Too>=3.4.2
  Downloading Flask_Security_Too-3.4.3-py2.py3-none-any.whl (185 kB)
Collecting flask-seasurf>=0.2.2
  Downloading Flask-SeaSurf-0.2.2.tar.gz (5.1 kB)
Collecting bcrypt>=3.1.7
  Downloading bcrypt-3.1.7.tar.gz (42 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting Werkzeug>=1.0.1
  Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting maya>=0.6.1
  Downloading maya-0.6.1-py2.py3-none-any.whl (12 kB)
Collecting mistune==2.0.0a4
  Downloading mistune-2.0.0a4-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: python-slugify>=4.0.0 in /root/.local/lib/python3.8/site-packages (from -r requirements.txt (line 11)) (4.0.0)
Collecting gunicorn>=20.0.4
  Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: mypy in /root/.local/lib/python3.8/site-packages (from topic-db>=1.0.0->-r requirements.txt (line 1)) (0.780)
Requirement already satisfied: psycopg2 in /root/.local/lib/python3.8/site-packages (from topic-db>=1.0.0->-r requirements.txt (line 1)) (2.8.5)
Requirement already satisfied: typed-tree in /root/.local/lib/python3.8/site-packages (from topic-db>=1.0.0->-r requirements.txt (line 1)) (1.0.3)
Requirement already satisfied: pytest in /root/.local/lib/python3.8/site-packages (from topic-db>=1.0.0->-r requirements.txt (line 1)) (5.4.3)
Requirement already satisfied: memory-profiler in /root/.local/lib/python3.8/site-packages (from topic-db>=1.0.0->-r requirements.txt (line 1)) (0.57.0)
Collecting Jinja2>=2.10.1
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting click>=5.1
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting itsdangerous>=0.24
  Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Flask-Principal>=0.4.0
  Downloading Flask-Principal-0.4.0.tar.gz (5.5 kB)
Collecting Flask-Mail>=0.9.1
  Downloading Flask-Mail-0.9.1.tar.gz (45 kB)
Collecting Flask-BabelEx>=0.9.3
  Downloading Flask_BabelEx-0.9.4-py3-none-any.whl (8.7 kB)
Collecting email-validator>=1.0.5
  Downloading email_validator-1.1.1-py2.py3-none-any.whl (17 kB)
Collecting passlib>=1.7.1
  Downloading passlib-1.7.2-py2.py3-none-any.whl (507 kB)
Collecting Flask-Login>=0.4.1
  Downloading Flask_Login-0.5.0-py2.py3-none-any.whl (16 kB)
Collecting Flask-WTF>=0.14.2
  Downloading Flask_WTF-0.14.3-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: six>=1.4.1 in /root/.local/lib/python3.8/site-packages (from bcrypt>=3.1.7->-r requirements.txt (line 7)) (1.15.0)
Processing /root/.cache/pip/wheels/89/96/42/98fbfabb3fd5a7ea40a01dab70dcbdf5d78e4652b30dbf9f33/cffi-1.14.0-cp38-cp38-linux_aarch64.whl
Collecting tzlocal
  Downloading tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Collecting dateparser>=0.7.0
  Downloading dateparser-0.7.6-py2.py3-none-any.whl (362 kB)
Collecting humanize
  Downloading humanize-2.4.0-py3-none-any.whl (62 kB)
Collecting pytz
  Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting pendulum>=2.0.2
  Downloading pendulum-2.1.0.tar.gz (80 kB)
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting snaptime
  Downloading snaptime-0.2.4.tar.gz (2.9 kB)
Requirement already satisfied: text-unidecode>=1.3 in /root/.local/lib/python3.8/site-packages (from python-slugify>=4.0.0->-r requirements.txt (line 11)) (1.3)
Requirement already satisfied: setuptools>=3.0 in /usr/local/lib/python3.8/site-packages (from gunicorn>=20.0.4->-r requirements.txt (line 12)) (47.1.1)
Requirement already satisfied: mypy-extensions<0.5.0,>=0.4.3 in /root/.local/lib/python3.8/site-packages (from mypy->topic-db>=1.0.0->-r requirements.txt (line 1)) (0.4.3)
Requirement already satisfied: typing-extensions>=3.7.4 in /root/.local/lib/python3.8/site-packages (from mypy->topic-db>=1.0.0->-r requirements.txt (line 1)) (3.7.4.2)
Requirement already satisfied: typed-ast<1.5.0,>=1.4.0 in /root/.local/lib/python3.8/site-packages (from mypy->topic-db>=1.0.0->-r requirements.txt (line 1)) (1.4.1)
Requirement already satisfied: attrs>=17.4.0 in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (19.3.0)
Requirement already satisfied: more-itertools>=4.0.0 in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (8.4.0)
Requirement already satisfied: py>=1.5.0 in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (1.8.2)
Requirement already satisfied: pluggy<1.0,>=0.12 in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (0.13.1)
Requirement already satisfied: packaging in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (20.4)
Requirement already satisfied: wcwidth in /root/.local/lib/python3.8/site-packages (from pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (0.2.4)
Requirement already satisfied: psutil in /root/.local/lib/python3.8/site-packages (from memory-profiler->topic-db>=1.0.0->-r requirements.txt (line 1)) (5.7.0)
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Collecting blinker
  Downloading blinker-1.4.tar.gz (111 kB)
Collecting speaklater>=1.2
  Downloading speaklater-1.3.tar.gz (3.6 kB)
Collecting Babel>=1.0
  Downloading Babel-2.8.0-py2.py3-none-any.whl (8.6 MB)
Collecting dnspython>=1.15.0
  Downloading dnspython-1.16.0-py2.py3-none-any.whl (188 kB)
Collecting idna>=2.0.0
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting WTForms
  Downloading WTForms-2.3.1-py2.py3-none-any.whl (169 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting python-dateutil
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting regex!=2019.02.19
  Downloading regex-2020.6.8.tar.gz (690 kB)
Collecting pytzdata>=2018.3
  Downloading pytzdata-2019.3-py2.py3-none-any.whl (489 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /root/.local/lib/python3.8/site-packages (from packaging->pytest->topic-db>=1.0.0->-r requirements.txt (line 1)) (2.4.7)
Building wheels for collected packages: SQLAlchemy, flask-seasurf, bcrypt, Flask-Principal, Flask-Mail, pendulum, snaptime, MarkupSafe, blinker, speaklater, regex
  Building wheel for SQLAlchemy (setup.py): started
  Building wheel for SQLAlchemy (setup.py): finished with status 'done'
  Created wheel for SQLAlchemy: filename=SQLAlchemy-1.3.17-cp38-cp38-linux_aarch64.whl size=1249337 sha256=be2e34459b88852c7309957fef6763b1358bcc5483466ea3e2ee63bc4c0cb191
  Stored in directory: /root/.cache/pip/wheels/5c/91/c7/fe37d2fa2e066dad548c0d3e131b2119222e6f77454bd19c13
  Building wheel for flask-seasurf (setup.py): started
  Building wheel for flask-seasurf (setup.py): finished with status 'done'
  Created wheel for flask-seasurf: filename=Flask_SeaSurf-0.2.2-py3-none-any.whl size=5562 sha256=3dd7aabc186dae2f69109bd2a759688cc5f65a5a5d66d5b89c5f3302c4c9cfdb
  Stored in directory: /root/.cache/pip/wheels/fe/5b/a9/07a4230f985c8423bc1af134e95c6e3ddac4f94fb154ebd853
  Building wheel for bcrypt (PEP 517): started
  Building wheel for bcrypt (PEP 517): finished with status 'done'
  Created wheel for bcrypt: filename=bcrypt-3.1.7-cp38-cp38-linux_aarch64.whl size=57679 sha256=11093329a6dc594759cee9e23ea945eb44c007c25b56b9d0a503d4a7107e264a
  Stored in directory: /root/.cache/pip/wheels/08/dd/04/63fe9a4002c36105c358f90221e4882825a264edb9d8554163
  Building wheel for Flask-Principal (setup.py): started
  Building wheel for Flask-Principal (setup.py): finished with status 'done'
  Created wheel for Flask-Principal: filename=Flask_Principal-0.4.0-py3-none-any.whl size=5573 sha256=f80e535ca8602a83a877ed280ad0b61cd9ebaf767bcc17076b9f2220be9e3a6b
  Stored in directory: /root/.cache/pip/wheels/8b/e7/dd/e6981d426247840129ba941a3031669cb6afcf018b0665b637
  Building wheel for Flask-Mail (setup.py): started
  Building wheel for Flask-Mail (setup.py): finished with status 'done'
  Created wheel for Flask-Mail: filename=Flask_Mail-0.9.1-py3-none-any.whl size=7568 sha256=d93bfac59e184a6fce486ee7451b2e35753cf08f9923d46a65511bcc647a4349
  Stored in directory: /root/.cache/pip/wheels/98/bc/8c/34c329e4d7efeaf7b9886db0c76d0b23170e54de443f688e3c
  Building wheel for pendulum (PEP 517): started
  Building wheel for pendulum (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpm7ceji7b
       cwd: /tmp/pip-install-lo3brvr1/pendulum
  Complete output (24 lines):
  Traceback (most recent call last):
    File "setup.py", line 2, in <module>
      from setuptools import setup
  ModuleNotFoundError: No module named 'setuptools'
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-bx8hjws8/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
      return unicode(WheelBuilder.make_in(poetry, Path(wheel_directory)))
    File "/tmp/pip-build-env-bx8hjws8/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 55, in make_in
      wb.build()
    File "/tmp/pip-build-env-bx8hjws8/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 81, in build
      self._build(zip_file)
    File "/tmp/pip-build-env-bx8hjws8/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 100, in _build
      self._run_build_command(setup)
    File "/tmp/pip-build-env-bx8hjws8/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 128, in _run_build_command
      subprocess.check_call(
    File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/local/bin/python', 'setup.py', 'build', '-b', 'build']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for pendulum
  Building wheel for snaptime (setup.py): started
  Building wheel for snaptime (setup.py): finished with status 'done'
  Created wheel for snaptime: filename=snaptime-0.2.4-py3-none-any.whl size=3595 sha256=7d127d97f39e17cb75acafce648f852a01091da6dd477b1831d868a1ba3ffa33
  Stored in directory: /root/.cache/pip/wheels/ef/75/ba/deb00489e86fe8ed045887958363a3ddf664227d0bab7f03a2
  Building wheel for MarkupSafe (setup.py): started
  Building wheel for MarkupSafe (setup.py): finished with status 'done'
  Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-cp38-cp38-linux_aarch64.whl size=32806 sha256=294a532385b2e8af42b270f4cc3005415be981475a1bbeda153f06447e819efd
  Stored in directory: /root/.cache/pip/wheels/0c/61/d6/4db4f4c28254856e82305fdb1f752ed7f8482e54c384d8cb0e
  Building wheel for blinker (setup.py): started
  Building wheel for blinker (setup.py): finished with status 'done'
  Created wheel for blinker: filename=blinker-1.4-py3-none-any.whl size=13452 sha256=5b06b44bb2d90fe8c212ae68f091d8a557bc0f3c90bf85afa4185e19778f3e8e
  Stored in directory: /root/.cache/pip/wheels/b7/a5/68/fe632054a5eadd531c7a49d740c50eb6adfbeca822b4eab8d4
  Building wheel for speaklater (setup.py): started
  Building wheel for speaklater (setup.py): finished with status 'done'
  Created wheel for speaklater: filename=speaklater-1.3-py3-none-any.whl size=4701 sha256=62ffbb11c358b63a23f81849f4f107538bd45a1fa124cb867e062f9dd8ff6538
  Stored in directory: /root/.cache/pip/wheels/21/55/7d/8584d2943f1717b5b3bd9bb80cb49298266cf151ed3b9d8cc9
  Building wheel for regex (setup.py): started
  Building wheel for regex (setup.py): finished with status 'done'
  Created wheel for regex: filename=regex-2020.6.8-cp38-cp38-linux_aarch64.whl size=669056 sha256=370e7b9e6aec53538975d15d90d50609b65a3ffa10c0c2de2745567f95f416e4
  Stored in directory: /root/.cache/pip/wheels/92/a0/30/b02d3121ed2dba407862df81a4df87d3f605226e4d72cfd07f
Successfully built SQLAlchemy flask-seasurf bcrypt Flask-Principal Flask-Mail snaptime MarkupSafe blinker speaklater regex
Failed to build pendulum
ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install --user git+https://github.com/brettkromkamp/topic-db.git  && pip install --user -r requirements.txt' returned a non-zero code: 1
ubuntu@ubuntu:/nashome/householdpi/contextualize-docker-configs/contextualise$ 

I see a proposed work-around here but I haven't yet managed to rejigger the FROM clause in the Dockerfile to make the fix work yet so I thought I'd also mention it here :)

@feoh
Copy link
Author

feoh commented Jun 16, 2020

I got it to work with this Dockerfile. I can generate a pull request if anyone likes. I won't do it un-asked since it's a bit of a departure from what's already there.

FROM python:3-alpine

# Metadata
LABEL \
  app.name="Contextualise" \
  app.description="A simple and flexible tool particularly suited for organising information-heavy projects and activities consisting of unstructured and widely diverse data and information resources" \
  app.license="MIT License" \
  app.license.url="https://github.com/brettkromkamp/contextualise/blob/master/LICENSE" \
  app.repo.url="https://github.com/brettkromkamp/contextualise" \
  app.authors="Brett Kromkamp <@brettkromkamp>"

RUN apk update \
    && apk add gcc musl-dev python3-dev py3-setuptools libffi libffi-dev openssl-dev git postgresql-dev \
    && pip3 install poetry \
    && pip3 install --no-build-isolation pendulum==2.1.0


# Fetch just the dependencies, caches on the contents of requirements.txt
WORKDIR /usr/src/app
COPY ./requirements.txt ./
RUN pip install --user git+https://github.com/brettkromkamp/topic-db.git \
 && pip install --user -r requirements.txt

# Copy in the rest of the project and dependencies
COPY . .
RUN test -f settings.ini || cp settings-docker-sample.ini settings.ini

# Config for python and the app
ENV \
  PYTHONUNBUFFERED=1 \
  PYTHONDONTWRITEBYTECODE=1 \
  FLASK_APP=contextualise \
  FLASK_ENV=production \
  PATH=$PATH:/root/.local/bin

# Execute via gunicorn by default
CMD ["gunicorn", "-b", "0.0.0.0:5000", "contextualise.wsgi:app"]
EXPOSE 5000

@brettkromkamp
Copy link
Owner

@feoh Thanks for reporting the issue and providing a potential fix! My knowledge of Docker is limited hence I am unsure how to proceed with your suggested fix. Ideally, those that have contributed Docker support to Contextualise weigh in :) @machawk1 @epilys @stratosgear @Nekroze

@machawk1
Copy link
Contributor

@ibnesayeed has some Docker expertise, so it would be helpful for him to have a quick look at the Dockerfile for wellformedness and adherence to contemporary good practice.

@ibnesayeed
Copy link

I don't see any issues in changing the base image to alpine as it may reduce the image size as well, but test building the image and the runtime properly before going for that change.

Alternatively, use build args to customize the base image and leave the default value as it is for now. Those who want to change the base image to alpine can create a custom image that has the additional apk update... layer in it then use that image as the base by providing a build arg.

@jonringer
Copy link

try doing pip install setuptools then the rest of your commands. There's likely to be a wheel available for setuptools, and you should be able to install without a problem.

Honestly it's weird that pip is available, but the de-facto packaging module setuptools is not available.

@feoh
Copy link
Author

feoh commented Jun 29, 2020

I don't understand enough about the alternative solutions people are suggesting to implement them, and I have something that works and left a crumb trail for anyone who just needs a quick fix to get this running on a pi, so I'll yield to your greater expertise and close this :)

@feoh feoh closed this as completed Jun 29, 2020
@brettkromkamp
Copy link
Owner

@feoh Thank you. I really do appreciate your contribution to Contextualise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants