Issue with uv and buildx resulting in failed build for ARM64
I want a frappe setup with docker and I followed the newly updated README for ARM64 and I ran into the issue where we are to build multi-architectural image using buildx
Steps to reproduce the issue
git clone https://github.com/frappe/frappe_docker && cd frappe_docker
docker buildx bake --no-cache --set "*.platform=linux/arm64"
Versions
- Rancher desktop -
v1.21.0
- Host machine -
macOS Tahoe
Error Stacktrace
=> ERROR [erpnext builder 1/1] RUN bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --ver 4.0s
=> CANCELED [build] exporting to image 4.0s
=> => exporting layers 4.0s
------
> [erpnext builder 1/1] RUN bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench && cd /home/frappe/frappe-bench && bench get-app --branch=develop --resolve-deps erpnext https://github.com/frappe/erpnext && echo "{}" > sites/common_site_config.json && find apps -mindepth 1 -path "*/.git" | xargs rm -fr:
0.350 Setting Up Environment
0.350 $ uv venv env --seed --python python3
0.402 Using CPython 3.11.6 interpreter at: /usr/local/bin/python3
0.402 Creating virtual environment with seed packages at: env
0.772 + packaging==26.0
0.773 + pip==26.0.1
0.774 + setuptools==82.0.0
0.775 + wheel==0.46.3
1.434 Getting frappe
1.434 $ git clone https://github.com/frappe/frappe --branch develop --depth 1 --origin upstream
1.436 Cloning into 'frappe'...
3.630 Installing frappe
3.630 $ uv pip install --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
3.655 Using Python 3.11.6 environment at: env
3.802 × Failed to build `frappe @ file:///home/frappe/frappe-bench/apps/frappe`
3.802 ├─▶ The build backend returned an error
3.802 ╰─▶ Call to `flit_core.buildapi.build_editable` failed (exit status: 1)
3.802
3.802 [stderr]
3.802 Traceback (most recent call last):
3.802 File "<string>", line 14, in <module>
3.802 File
3.802 "/home/frappe/.cache/uv/builds-v0/.tmp5nhGVU/lib/python3.11/site-packages/flit_core/buildapi.py",
3.802 line 32, in get_requires_for_build_wheel
3.802 docstring, version = get_docstring_and_version_via_ast(module)
3.802 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.802 File
3.802 "/home/frappe/.cache/uv/builds-v0/.tmp5nhGVU/lib/python3.11/site-packages/flit_core/common.py",
3.802 line 149, in get_docstring_and_version_via_ast
3.802 node = ast.parse(f.read())
3.802 ^^^^^^^^^^^^^^^^^^^
3.802 File "/usr/local/lib/python3.11/ast.py", line 50, in parse
3.802 return compile(source, filename, mode, flags,
3.802 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.802 File "<unknown>", line 91
3.802 type ConfType = _dict[str, Any] # type: ignore[no-any-explicit]
3.802 ^^^^^^^^
3.802 SyntaxError: invalid syntax
3.802
3.802 hint: This usually indicates a problem with the package or the build
3.802 environment.
3.803 Error occured during app install: uv pip install --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
------
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
Containerfile:110
--------------------
109 | ARG ERPNEXT_BRANCH=version-16
110 | >>> RUN bench init \
111 | >>> --frappe-branch=${FRAPPE_BRANCH} \
112 | >>> --frappe-path=${FRAPPE_PATH} \
113 | >>> --no-procfile \
114 | >>> --no-backups \
115 | >>> --skip-redis-config-generation \
116 | >>> --verbose \
117 | >>> /home/frappe/frappe-bench && \
118 | >>> cd /home/frappe/frappe-bench && \
119 | >>> bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && \
120 | >>> echo "{}" > sites/common_site_config.json && \
121 | >>> find apps -mindepth 1 -path "*/.git" | xargs rm -fr
122 |
--------------------
ERROR: target erpnext: failed to solve: process "/bin/sh -c bench init --frappe-branch=${FRAPPE_BRANCH} --frappe-path=${FRAPPE_PATH} --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench && cd /home/frappe/frappe-bench && bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && echo \"{}\" > sites/common_site_config.json && find apps -mindepth 1 -path \"*/.git\" | xargs rm -fr" did not complete successfully: exit code: 167
View build details: docker-desktop://dashboard/build/rancher-desktop/rancher-desktop/mx71gxnwzqbv5rwxb9sdvrrce
Full Stacktrace
[+] Building 62.0s (15/17) docker:rancher-desktop
=> [internal] load local bake definitions 0.0s
=> => reading compose.yaml 2.89kB / 2.89kB 0.0s
=> => reading docker-bake.hcl 2.81kB / 2.81kB 0.0s
=> [base internal] load build definition from Containerfile 0.0s
=> => transferring dockerfile: 4.67kB 0.0s
=> [erpnext internal] load metadata for docker.io/library/python:3.11.6-slim-bookworm 3.7s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
=> [erpnext internal] load .dockerignore 0.0s
=> => transferring context: 83B 0.0s
=> [base base 1/4] FROM docker.io/library/python:3.11.6-slim-bookworm@sha256:cc758519481092eb5a4a5ab0c1b303e288880d59afc601958d19e95b300bc86b 3.9s
=> => resolve docker.io/library/python:3.11.6-slim-bookworm@sha256:cc758519481092eb5a4a5ab0c1b303e288880d59afc601958d19e95b300bc86b 0.0s
=> => sha256:17496c2ae7ce111358b5e4e67e0021e8dac8ac474451fd97b5a40863e9ba1767 233B / 233B 0.9s
=> => sha256:6f493a7a71cbd9cead45e76196db4cd738fa331e33881e7e19ab215a8a9b6a09 12.81MB / 12.81MB 2.0s
=> => sha256:baaf5fcd558cda1b51379fb0568366cf1de9f1c59240daa09ca163dcaad590ab 3.19MB / 3.19MB 1.2s
=> => sha256:59f2d5a72edf611dea7729627f20616bddc71a961e6f104cc6b3c5d62cfe3122 3.13MB / 3.13MB 1.2s
=> => sha256:2c6d21737d8318aa15c4cc838475029a5efc36c0429e3d8da80d97d0b96d9aaf 29.18MB / 29.18MB 2.1s
=> => extracting sha256:2c6d21737d8318aa15c4cc838475029a5efc36c0429e3d8da80d97d0b96d9aaf 0.5s
=> => extracting sha256:59f2d5a72edf611dea7729627f20616bddc71a961e6f104cc6b3c5d62cfe3122 0.1s
=> => extracting sha256:6f493a7a71cbd9cead45e76196db4cd738fa331e33881e7e19ab215a8a9b6a09 0.2s
=> => extracting sha256:17496c2ae7ce111358b5e4e67e0021e8dac8ac474451fd97b5a40863e9ba1767 0.0s
=> => extracting sha256:baaf5fcd558cda1b51379fb0568366cf1de9f1c59240daa09ca163dcaad590ab 0.1s
=> [build internal] load build context 0.0s
=> => transferring context: 4.52kB 0.0s
=> [erpnext base 2/4] RUN useradd -ms /bin/bash frappe && apt-get update && apt-get install --no-install-recommends -y curl git vim nginx gettext-base file 30.6s
=> [erpnext base 3/4] COPY resources/core/nginx/nginx-template.conf /templates/nginx/frappe.conf.template 0.1s
=> [build base 4/4] COPY resources/core/nginx/nginx-entrypoint.sh /usr/local/bin/nginx-entrypoint.sh 0.0s
=> [erpnext erpnext 1/3] RUN echo "echo "Commands restricted in prodution container, Read FAQ before you proceed: https://frappe.io/ctr-faq"" >> ~/.bashrc 0.3s
=> [erpnext build 1/1] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y wget libpq-dev libffi-dev liblcms2-dev libldap2- 19.4s
=> [base] exporting to image 20.4s
=> => exporting layers 15.2s
=> => exporting manifest sha256:77fef7554d39d8ad7bfcdd1d06eb27e187774a1ac5d71624b397e7c68b285cdd 0.0s
=> => exporting config sha256:d19d15331fafea71d9b9e2c003a8f2fb4bf401084beb95717562bbe851c9a7c0 0.0s
=> => exporting attestation manifest sha256:ddcd4b22bcf208f3aced1945cfbaadfb9c3d68f3b5df74ca667b91a9f7cbb172 0.0s
=> => exporting manifest list sha256:30fb7595f601ef89ad1af34aef041ae0136e271f3f5f2ed3c47a7a8c8f76ab26 0.0s
=> => naming to docker.io/frappe/base:develop 0.0s
=> => unpacking to docker.io/frappe/base:develop 5.1s
=> => naming to docker.io/frappe/base:latest 0.0s
=> => unpacking to docker.io/frappe/base:latest 0.0s
=> ERROR [erpnext builder 1/1] RUN bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --ver 4.0s
=> CANCELED [build] exporting to image 4.0s
=> => exporting layers 4.0s
------
> [erpnext builder 1/1] RUN bench init --frappe-branch=develop --frappe-path=https://github.com/frappe/frappe --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench && cd /home/frappe/frappe-bench && bench get-app --branch=develop --resolve-deps erpnext https://github.com/frappe/erpnext && echo "{}" > sites/common_site_config.json && find apps -mindepth 1 -path "*/.git" | xargs rm -fr:
0.350 Setting Up Environment
0.350 $ uv venv env --seed --python python3
0.402 Using CPython 3.11.6 interpreter at: /usr/local/bin/python3
0.402 Creating virtual environment with seed packages at: env
0.772 + packaging==26.0
0.773 + pip==26.0.1
0.774 + setuptools==82.0.0
0.775 + wheel==0.46.3
1.434 Getting frappe
1.434 $ git clone https://github.com/frappe/frappe --branch develop --depth 1 --origin upstream
1.436 Cloning into 'frappe'...
3.630 Installing frappe
3.630 $ uv pip install --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
3.655 Using Python 3.11.6 environment at: env
3.802 × Failed to build `frappe @ file:///home/frappe/frappe-bench/apps/frappe`
3.802 ├─▶ The build backend returned an error
3.802 ╰─▶ Call to `flit_core.buildapi.build_editable` failed (exit status: 1)
3.802
3.802 [stderr]
3.802 Traceback (most recent call last):
3.802 File "<string>", line 14, in <module>
3.802 File
3.802 "/home/frappe/.cache/uv/builds-v0/.tmp5nhGVU/lib/python3.11/site-packages/flit_core/buildapi.py",
3.802 line 32, in get_requires_for_build_wheel
3.802 docstring, version = get_docstring_and_version_via_ast(module)
3.802 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.802 File
3.802 "/home/frappe/.cache/uv/builds-v0/.tmp5nhGVU/lib/python3.11/site-packages/flit_core/common.py",
3.802 line 149, in get_docstring_and_version_via_ast
3.802 node = ast.parse(f.read())
3.802 ^^^^^^^^^^^^^^^^^^^
3.802 File "/usr/local/lib/python3.11/ast.py", line 50, in parse
3.802 return compile(source, filename, mode, flags,
3.802 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.802 File "<unknown>", line 91
3.802 type ConfType = _dict[str, Any] # type: ignore[no-any-explicit]
3.802 ^^^^^^^^
3.802 SyntaxError: invalid syntax
3.802
3.802 hint: This usually indicates a problem with the package or the build
3.802 environment.
3.803 Error occured during app install: uv pip install --upgrade -e /home/frappe/frappe-bench/apps/frappe --python /home/frappe/frappe-bench/env/bin/python
------
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
WARNING: The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string.
Containerfile:110
--------------------
109 | ARG ERPNEXT_BRANCH=version-16
110 | >>> RUN bench init \
111 | >>> --frappe-branch=${FRAPPE_BRANCH} \
112 | >>> --frappe-path=${FRAPPE_PATH} \
113 | >>> --no-procfile \
114 | >>> --no-backups \
115 | >>> --skip-redis-config-generation \
116 | >>> --verbose \
117 | >>> /home/frappe/frappe-bench && \
118 | >>> cd /home/frappe/frappe-bench && \
119 | >>> bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && \
120 | >>> echo "{}" > sites/common_site_config.json && \
121 | >>> find apps -mindepth 1 -path "*/.git" | xargs rm -fr
122 |
--------------------
ERROR: target erpnext: failed to solve: process "/bin/sh -c bench init --frappe-branch=${FRAPPE_BRANCH} --frappe-path=${FRAPPE_PATH} --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench && cd /home/frappe/frappe-bench && bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && echo \"{}\" > sites/common_site_config.json && find apps -mindepth 1 -path \"*/.git\" | xargs rm -fr" did not complete successfully: exit code: 167
View build details: docker-desktop://dashboard/build/rancher-desktop/rancher-desktop/mx71gxnwzqbv5rwxb9sdvrrce
Issue with
uvandbuildxresulting in failed build for ARM64I want a frappe setup with docker and I followed the newly updated README for ARM64 and I ran into the issue where we are to build multi-architectural image using
buildxSteps to reproduce the issue
git clone https://github.com/frappe/frappe_docker && cd frappe_dockerdocker buildx bake --no-cache --set "*.platform=linux/arm64"Versions
v1.21.0macOS TahoeError Stacktrace
Full Stacktrace