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

Cannot build docker image #183

Closed
michnovka opened this issue Dec 4, 2024 · 3 comments
Closed

Cannot build docker image #183

michnovka opened this issue Dec 4, 2024 · 3 comments

Comments

@michnovka
Copy link

superuser@SuperTower:~/dockers/basicswap/docker$ docker compose build
WARN[0000] /home/superuser/dockers/basicswap/docker/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Building 41.4s (8/12)                                                docker:default
 => [swapclient internal] load build definition from Dockerfile                    0.0s
 => => transferring dockerfile: 810B                                               0.0s
 => [swapclient internal] load metadata for docker.io/library/ubuntu:22.04         1.6s
 => [swapclient internal] load .dockerignore                                       0.0s
 => => transferring context: 2B                                                    0.0s
 => [swapclient internal] load build context                                       0.2s
 => => transferring context: 22.72MB                                               0.1s
 => [swapclient 1/8] FROM docker.io/library/ubuntu:22.04@sha256:0e5e4a57c2499249a  0.1s
 => => resolve docker.io/library/ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd5  0.0s
 => => sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994 6.69kB / 6.69kB  0.0s
 => => sha256:3d1556a8a18cf5307b121e0a98e93f1ddf1f3f8e092f1fddfd94125 424B / 424B  0.0s
 => => sha256:97271d29cb7956f0908cfb1449610a2cd9cb46b004ac8af25f0 2.30kB / 2.30kB  0.0s
 => [swapclient 2/8] RUN apt-get update;     apt-get install -y --no-install-rec  27.4s
 => [swapclient 3/8] COPY ./requirements.txt requirements.txt                      0.1s 
 => ERROR [swapclient 4/8] RUN pip3 install -r requirements.txt --require-hashes  12.1s 
------                                                                                  
 > [swapclient 4/8] RUN pip3 install -r requirements.txt --require-hashes:              
0.473 Collecting coincurve@ https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_v0.2.zip                                                                         
1.154   Downloading https://github.com/basicswap/coincurve/archive/refs/tags/basicswap_v0.2.zip                                                                                 
1.251      \ 146.0 kB 1.8 MB/s 0:00:00
1.389   Installing build dependencies: started
5.666   Installing build dependencies: finished with status 'done'
5.669   Getting requirements to build wheel: started
5.786   Getting requirements to build wheel: finished with status 'done'
5.902   Installing backend dependencies: started
9.594   Installing backend dependencies: finished with status 'done'
9.596   Preparing metadata (pyproject.toml): started
9.681   Preparing metadata (pyproject.toml): finished with status 'done'
9.825 Collecting asn1crypto==1.5.1
9.950   Downloading asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
10.00      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 105.0/105.0 KB 1.9 MB/s eta 0:00:00
10.27 Collecting cffi==1.17.1
10.28   Using cached cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (446 kB)
10.34 Collecting jinja2==3.1.4
10.37   Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
10.40      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 KB 6.3 MB/s eta 0:00:00
10.57 Collecting markupsafe==3.0.2
10.59   Downloading MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20 kB)
10.63 Collecting pycparser==2.22
10.63   Using cached pycparser-2.22-py3-none-any.whl (117 kB)
10.83 Collecting pycryptodome==3.21.0
10.86   Downloading pycryptodome-3.21.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)
10.94      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 30.4 MB/s eta 0:00:00
10.98 Collecting pysocks==1.7.1
11.00   Downloading PySocks-1.7.1-py3-none-any.whl (16 kB)
11.04 Collecting python-gnupg==0.5.3
11.07   Downloading python_gnupg-0.5.3-py2.py3-none-any.whl (21 kB)
11.57 Collecting pyzmq==26.2.0
11.59   Downloading pyzmq-26.2.0-cp310-cp310-manylinux_2_28_x86_64.whl (868 kB)
11.63      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 868.8/868.8 KB 29.7 MB/s eta 0:00:00
11.67 Building wheels for collected packages: coincurve
11.67   Building wheel for coincurve (pyproject.toml): started
11.84   Building wheel for coincurve (pyproject.toml): finished with status 'error'
11.84   error: subprocess-exited-with-error
11.84   
11.84   × Building wheel for coincurve (pyproject.toml) did not run successfully.
11.84   │ exit code: 1
11.84   ╰─> [37 lines of output]
11.84       WARNING: Use build.verbose instead of cmake.verbose for scikit-build-core >= 0.10
11.84       *** scikit-build-core 0.10.7 using CMake 3.31.1 (wheel)
11.84       *** Configuring CMake...
11.84       Traceback (most recent call last):
11.84         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
11.84           main()
11.84         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
11.84           json_out['return_val'] = hook(**hook_input['kwargs'])
11.84         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
11.84           return _build_backend().build_wheel(wheel_directory, config_settings,
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/hatchling/build.py", line 58, in build_wheel
11.84           return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/hatchling/builders/plugin/interface.py", line 147, in build
11.84           build_hook.initialize(version, build_data)
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/hatch/plugin.py", line 124, in initialize
11.84           self._initialize(build_data=build_data)
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/hatch/plugin.py", line 226, in _initialize
11.84           builder.configure(
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/builder/builder.py", line 166, in configure
11.84           local_def = set_environment_for_gen(
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/builder/generator.py", line 121, in set_environment_for_gen
11.84           ninja = best_program(get_ninja_programs(), version=ninja_settings.version)
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/program_search.py", line 169, in best_program
11.84           for program in programs:
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/program_search.py", line 136, in get_ninja_programs
11.84           result = Run().capture(ninja_path, "--version")
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/_shutil.py", line 43, in capture
11.84           return self._run(args, capture=True)
11.84         File "/tmp/pip-build-env-88r_bc4a/overlay/local/lib/python3.10/dist-packages/scikit_build_core/_shutil.py", line 71, in _run
11.84           return subprocess.run(
11.84         File "/usr/lib/python3.10/subprocess.py", line 503, in run
11.84           with Popen(*popenargs, **kwargs) as process:
11.84         File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
11.84           self._execute_child(args, executable, preexec_fn, close_fds,
11.84         File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
11.84           raise child_exception_type(errno_num, err_msg, err_filename)
11.84       FileNotFoundError: [Errno 2] No such file or directory: 'ninja'
11.84       [end of output]
11.84   
11.84   note: This error originates from a subprocess, and is likely not a problem with pip.
11.84   ERROR: Failed building wheel for coincurve
11.84 Failed to build coincurve
11.84 ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects
------
failed to solve: process "/bin/sh -c pip3 install -r requirements.txt --require-hashes" did not complete successfully: exit code: 1
@dassiegfried
Copy link

i had the same issue seems to be there is a apt package missing in the https://github.com/basicswap/basicswap/blob/master/Dockerfile#L9
as described in this issue: ninja-build/ninja#1463 the py-package coincurve needs the ninja-build apt package installed so i added it on my localy cloned Dockerfile in the linked line.

IDK if this "fix" is intended so i wont make a PR for this and let the devs decide if the want to apply the fix.

@muscleman
Copy link

works for me

tecnovert added a commit that referenced this issue Dec 25, 2024
@nahuhh
Copy link
Collaborator

nahuhh commented Jan 21, 2025

Fixed in 059356c

@nahuhh nahuhh closed this as completed Jan 21, 2025
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

4 participants