sighmon / balena-enviro-plus

Enviro-plus environment sensor deployment to Raspberry Pi via Balena IoT platform
9 stars 7 forks source link

Docker Build Failed #11

Closed jozujo closed 3 years ago

jozujo commented 3 years ago

Hi, I'm quite new to Docker and Pi projects in general. I've been trying to get this project to work for a few days now, but have kept hitting the same wall when trying to build the Docker. After typing in docker build -t sighmon/enviroplus_exporter:v1 ., I get the dialog below. (tldr: the system cannot copy enviroplus_exporter/notecard/notecard/notecard.py). Any ideas on what to do with this error? A step by step guide for a dummy like me would be greatly appreciated! (Using a Pi Zero with Enviro+ board and PMS5003 particulate monitor, for your reference).

Cheers!


Step 1/25 : FROM sighmon/balena-enviro-plus:v1
v1: Pulling from sighmon/balena-enviro-plus
ffe15ac77465: Pull complete 
204eda513e41: Pull complete 
bc094b29b89f: Pull complete 
76103017980a: Pull complete 
12d536eab3f1: Pull complete 
a94150a49fe5: Pull complete 
08b3da0eac65: Pull complete 
2bbc83351a7f: Pull complete 
b58c69af2882: Pull complete 
98f7b96043e5: Pull complete 
b3835cdc70cc: Pull complete 
27a421cb0afb: Pull complete 
535c781662ea: Pull complete 
555259908d66: Pull complete 
5b9cec28024c: Pull complete 
8ea8f25695ce: Pull complete 
4c93a2f4616a: Pull complete 
bae26e32d188: Pull complete 
b56961f10446: Pull complete 
1fa1d2228cdd: Pull complete 
03afa7c522c2: Pull complete 
5496b7dfb38e: Pull complete 
39371dbbef98: Pull complete 
e2179a61577e: Pull complete 
Digest: sha256:ca649f624c449fbc9d5bcfabb2403fe243473fbc01475db397bd2a369b062850
Status: Downloaded newer image for sighmon/balena-enviro-plus:v1
 ---> 6c1b56c59a84
Step 2/25 : WORKDIR /usr/src
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v6) and no specific platform was requested
 ---> Running in 6efe74c66fda
Removing intermediate container 6efe74c66fda
 ---> a3bbe38b79d1
Step 3/25 : RUN sudo pip3 install --upgrade setuptools && sudo pip3 install     adafruit-circuitpython-lc709203f     influxdb-client     prometheus_client     python-periphery     SafecastPy
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v6) and no specific platform was requested
 ---> Running in 139e72c8b8e7
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/bd/25/5bdf7f1adeebd4e3fa76b2e2f045ae53ee208e40a4231ad0f0c3007e4353/setuptools-57.4.0-py3-none-any.whl (819kB)
Installing collected packages: setuptools
  Found existing installation: setuptools 41.0.1
    Uninstalling setuptools-41.0.1:
      Successfully uninstalled setuptools-41.0.1
Successfully installed setuptools-57.4.0
WARNING: You are using pip version 19.2.1, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting adafruit-circuitpython-lc709203f
  Downloading https://files.pythonhosted.org/packages/c0/53/9deb2f6135a57df08beaf151d5fdebad0a17bb3626b1ce8f531837c21658/adafruit-circuitpython-lc709203f-2.1.0.tar.gz
  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'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting influxdb-client
  Downloading https://files.pythonhosted.org/packages/25/49/3378a53dd820b1251415800990588b3dabd486ce527157056c67152cf22b/influxdb_client-1.19.0-py3-none-any.whl (503kB)
Collecting prometheus_client
  Downloading https://files.pythonhosted.org/packages/09/da/4e8471ff825769581593b5b84769d32f58e5373b59fccaf355d3529ad530/prometheus_client-0.11.0-py2.py3-none-any.whl (56kB)
Collecting python-periphery
  Downloading https://files.pythonhosted.org/packages/00/2c/39f674e6cefd3ff8f2825d37efbb4f763eb0504ccb4405d05a498026845e/python_periphery-2.3.0-py2.py3-none-any.whl
Collecting SafecastPy
  Downloading https://files.pythonhosted.org/packages/e7/38/fb4ef0ae139570781127c0b342bd521316766f1fe34994a3b2bb0906c6d1/SafecastPy-0.1.1-py2.py3-none-any.whl
Collecting Adafruit-Blinka (from adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/d8/4d/bf54e6a792c7e374bd4ce36c59e87dcc9cc950b4ab1432abc5b7492d5427/Adafruit-Blinka-6.12.0.tar.gz (137kB)
Collecting adafruit-circuitpython-busdevice (from adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/09/b8/5a057c82715f22b90097a0c6fbaec75993a151f3f568664e9f9ad40d6384/adafruit-circuitpython-busdevice-5.0.6.tar.gz
Collecting adafruit-circuitpython-register (from adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/aa/b9/d8321c13d9d7661e88ac155b08f71d5ae2973aa4e127001c5ff8801aee08/adafruit-circuitpython-register-1.9.5.tar.gz
Requirement already satisfied: certifi>=14.05.14 in /usr/local/lib/python3.7/site-packages (from influxdb-client) (2019.11.28)
Collecting rx>=3.0.1 (from influxdb-client)
  Downloading https://files.pythonhosted.org/packages/e2/a9/efeaeca4928a9a56d04d609b5730994d610c82cf4d9dd7aa173e6ef4233e/Rx-3.2.0-py3-none-any.whl (199kB)
Requirement already satisfied: urllib3>=1.15.1 in /usr/local/lib/python3.7/site-packages (from influxdb-client) (1.25.8)
Requirement already satisfied: setuptools>=21.0.0 in /usr/local/lib/python3.7/site-packages (from influxdb-client) (57.4.0)
Requirement already satisfied: pytz>=2019.1 in /usr/local/lib/python3.7/site-packages (from influxdb-client) (2019.3)
Collecting six>=1.10 (from influxdb-client)
  Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Collecting python-dateutil>=2.5.3 (from influxdb-client)
  Downloading https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247kB)
Requirement already satisfied: requests>=2.9.1 in /usr/local/lib/python3.7/site-packages (from SafecastPy) (2.23.0)
Collecting Adafruit-PlatformDetect>=3.13.0 (from Adafruit-Blinka->adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/58/31/a53cc50f6b3344530c3165ebd3521314b5acf07c6172f2193599ba683b41/Adafruit-PlatformDetect-3.15.3.tar.gz
Collecting Adafruit-PureIO>=1.1.7 (from Adafruit-Blinka->adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/df/ca/9162d4648669d12af16d5a66d808bdef6967eb684cbed9b1a3ebc19b361a/Adafruit_PureIO-1.1.9.tar.gz
Collecting pyftdi>=0.40.0 (from Adafruit-Blinka->adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/db/d4/2aa53587bca47757351093656b3137dbcea68349ae993a459d8d7d30fc87/pyftdi-0.53.2-py3-none-any.whl (141kB)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests>=2.9.1->SafecastPy) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests>=2.9.1->SafecastPy) (2.9)
Collecting pyusb<1.2.0,>=1.0.0 (from pyftdi>=0.40.0->Adafruit-Blinka->adafruit-circuitpython-lc709203f)
  Downloading https://files.pythonhosted.org/packages/12/9b/8f5be839753667c39fe522162bea7f8121f28ba49c5ad1e5681681967c79/pyusb-1.1.0.tar.gz (78kB)
  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'
Requirement already satisfied: pyserial>=3.0 in /usr/local/lib/python3.7/site-packages (from pyftdi>=0.40.0->Adafruit-Blinka->adafruit-circuitpython-lc709203f) (3.4)
Building wheels for collected packages: adafruit-circuitpython-lc709203f, pyusb
  Building wheel for adafruit-circuitpython-lc709203f (PEP 517): started
  Building wheel for adafruit-circuitpython-lc709203f (PEP 517): finished with status 'done'
  Created wheel for adafruit-circuitpython-lc709203f: filename=adafruit_circuitpython_lc709203f-2.1.0-cp37-none-any.whl size=5891 sha256=6d7920c6d0ec0607a090d1117d2807a4111fe128ea1030baa906de210674defa
  Stored in directory: /root/.cache/pip/wheels/8a/ae/42/a816425cfe15293ec455f6cc16af0097edac1e1d6801daedaf
  Building wheel for pyusb (PEP 517): started
  Building wheel for pyusb (PEP 517): finished with status 'done'
  Created wheel for pyusb: filename=pyusb-1.1.0-cp37-none-any.whl size=58041 sha256=46e455ae50af5e301a4675cf0da4d7b37cd9737df0f2f2f45795eec093901932
  Stored in directory: /root/.cache/pip/wheels/ea/aa/e9/8796f45c3f3b836c0ca3cb86a97605f963a5139bc7cbddec9f
Successfully built adafruit-circuitpython-lc709203f pyusb
Installing collected packages: Adafruit-PlatformDetect, Adafruit-PureIO, pyusb, pyftdi, Adafruit-Blinka, adafruit-circuitpython-busdevice, adafruit-circuitpython-register, adafruit-circuitpython-lc709203f, rx, six, python-dateutil, influxdb-client, prometheus-client, python-periphery, SafecastPy
  Running setup.py install for Adafruit-PlatformDetect: started
    Running setup.py install for Adafruit-PlatformDetect: finished with status 'done'
  Running setup.py install for Adafruit-PureIO: started
    Running setup.py install for Adafruit-PureIO: finished with status 'done'
  Running setup.py install for Adafruit-Blinka: started
    Running setup.py install for Adafruit-Blinka: finished with status 'done'
  Running setup.py install for adafruit-circuitpython-busdevice: started
    Running setup.py install for adafruit-circuitpython-busdevice: finished with status 'done'
  Running setup.py install for adafruit-circuitpython-register: started
    Running setup.py install for adafruit-circuitpython-register: finished with status 'done'
Successfully installed Adafruit-Blinka-6.12.0 Adafruit-PlatformDetect-3.15.3 Adafruit-PureIO-1.1.9 SafecastPy-0.1.1 adafruit-circuitpython-busdevice-5.0.6 adafruit-circuitpython-lc709203f-2.1.0 adafruit-circuitpython-register-1.9.5 influxdb-client-1.19.0 prometheus-client-0.11.0 pyftdi-0.53.2 python-dateutil-2.8.2 python-periphery-2.3.0 pyusb-1.1.0 rx-3.2.0 six-1.16.0
WARNING: You are using pip version 19.2.1, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Removing intermediate container 139e72c8b8e7
 ---> ce998cdc30cd
Step 4/25 : COPY enviroplus_exporter/enviroplus_exporter.py enviroplus_exporter.py
 ---> 8eeb58d4c62d
Step 5/25 : COPY enviroplus_exporter/notecard/notecard/notecard.py notecard/notecard/notecard.py
COPY failed: file not found in build context or excluded by .dockerignore: stat enviroplus_exporter/notecard/notecard/notecard.py: file does not exist```