bepolytech / ULBDiscordBot

Discord bot to verify a user's ULB studentship
https://hub.docker.com/r/bepolytech/ulbdiscordbot
GNU General Public License v3.0
4 stars 1 forks source link

Docker build error during PyYAML pip build #30

Closed OscarVsp closed 9 months ago

OscarVsp commented 9 months ago

There is an error occurring during the automatic Docker Build during the pip installation of PyYAML, on all branch, even on the main which was correctly built before and has not been modify since.

This may be due to a change in the Docker build itself ?

#10 2.784   Downloading PyYAML-6.0.tar.gz (124 kB)
#10 2.787      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 198.7 MB/s eta 0:00:00
#10 2.937   Installing build dependencies: started
#10 5.198   Installing build dependencies: finished with status 'done'
#10 5.199   Getting requirements to build wheel: started
#10 5.444   Getting requirements to build wheel: finished with status 'error'
#10 5.451   error: subprocess-exited-with-error
#10 5.451   
#10 5.451   × Getting requirements to build wheel did not run successfully.
#10 5.451   │ exit code: 1
#10 5.451   ╰─> [48 lines of output]
#10 5.451       running egg_info
#10 5.451       writing lib/PyYAML.egg-info/PKG-INFO
#10 5.451       writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
#10 5.451       writing top-level names to lib/PyYAML.egg-info/top_level.txt
#10 5.451       Traceback (most recent call last):
#10 5.451         File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#10 5.451           main()
#10 5.451         File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#10 5.451           json_out['return_val'] = hook(**hook_input['kwargs'])
#10 5.451         File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#10 5.451           return hook(config_settings)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
#10 5.451           return self._get_build_requires(config_settings, requirements=['wheel'])
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
#10 5.451           self.run_setup()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
#10 5.451           exec(code, locals())
#10 5.451         File "<string>", line 288, in <module>
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
#10 5.451           return distutils.core.setup(**attrs)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
#10 5.451           return run_commands(dist)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
#10 5.451           dist.run_commands()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
#10 5.451           self.run_command(cmd)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 963, in run_command
#10 5.451           super().run_command(command)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#10 5.451           cmd_obj.run()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 321, in run
#10 5.451           self.find_sources()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
#10 5.451           mm.run()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 551, in run
#10 5.451           self.add_defaults()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
#10 5.451           sdist.add_defaults(self)
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/command/sdist.py", line 112, in add_defaults
#10 5.451           super().add_defaults()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
#10 5.451           self._add_defaults_ext()
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
#10 5.451           self.filelist.extend(build_ext.get_source_files())
#10 5.451         File "<string>", line 204, in get_source_files
#10 5.451         File "/tmp/pip-build-env-awrfhkfo/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
#10 5.451           raise AttributeError(attr)
#10 5.451       AttributeError: cython_sources
#10 5.451       [end of output]
#10 5.451   
#10 5.451   note: This error originates from a subprocess, and is likely not a problem with pip.
#10 5.453 error: subprocess-exited-with-error
#10 5.453 
#10 5.453 × Getting requirements to build wheel did not run successfully.
#10 5.453 │ exit code: 1
#10 5.453 ╰─> See above for output.
#10 5.453 
#10 5.453 note: This error originates from a subprocess, and is likely not a problem with pip.
#10 ERROR: process "/bin/sh -c pip3 install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
------
 > [5/6] RUN pip3 install --no-cache-dir -r requirements.txt:
5.451       [end of output]
5.451   
5.451   note: This error originates from a subprocess, and is likely not a problem with pip.
5.453 error: subprocess-exited-with-error
5.453 
5.453 × Getting requirements to build wheel did not run successfully.
5.453 │ exit code: 1
5.453 ╰─> See above for output.
5.453 
5.453 note: This error originates from a subprocess, and is likely not a problem with pip.
------
Dockerfile:14
--------------------
  12 |     COPY requirements.txt ./
  13 |     #RUN pip3 install --extra-index-url https://alpine-wheels.github.io/index --no-cache-dir -r requirements.txt # if wheels dependencies build errors when using alpine
  14 | >>> RUN pip3 install --no-cache-dir -r requirements.txt
  15 |     
  16 |     COPY . .
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c pip3 install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
OscarVsp commented 9 months ago

@LucasPlacentino Any idea why this happens ?

LucasPlacentino commented 9 months ago
#10 5.453 × Getting requirements to build wheel did not run successfully.

bruh there's always a problem with wheel lol

Anyway, let's try to change this line back to the first one like described (we are using an Alpine docker image):

  13 |     #RUN pip3 install --extra-index-url https://alpine-wheels.github.io/index --no-cache-dir -r requirements.txt # if wheels dependencies build errors when using alpine
  14 | >>> RUN pip3 install --no-cache-dir -r requirements.txt
LucasPlacentino commented 9 months ago

I also had to upgrade PyYAML's version to 6.0.1