mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-26 22:59:57 +00:00
This PR fixes build issues associated with `aws-lc-rs`, while simplifying the build process. Previously, we used custom scripts for the musl and Windows ARM builds. These were complicated and prone to breaking. This PR switches to a setup that mirrors https://github.com/napi-rs/package-template/blob/main/.github/workflows/CI.yml. * linux glibc and musl builds now use the Docker images provided by the napi project * Windows ARM build now just cross compiles from Windows x64, which turns out to work quite well.
28 lines
979 B
Docker
28 lines
979 B
Docker
# Many linux dockerfile with Rust, Node, and Lance dependencies installed.
|
|
# This container allows building the node modules native libraries in an
|
|
# environment with a very old glibc, so that we are compatible with a wide
|
|
# range of linux distributions.
|
|
ARG ARCH=x86_64
|
|
|
|
FROM quay.io/pypa/manylinux_2_28_${ARCH}
|
|
|
|
ARG ARCH=x86_64
|
|
ARG DOCKER_USER=default_user
|
|
|
|
# Protobuf is also installed as root.
|
|
COPY install_protobuf.sh install_protobuf.sh
|
|
RUN ./install_protobuf.sh ${ARCH}
|
|
|
|
ENV DOCKER_USER=${DOCKER_USER}
|
|
# Create a group and user, but only if it doesn't exist
|
|
RUN echo ${ARCH} && id -u ${DOCKER_USER} >/dev/null 2>&1 || adduser --user-group --create-home --uid ${DOCKER_USER} build_user
|
|
|
|
# We switch to the user to install Rust and Node, since those like to be
|
|
# installed at the user level.
|
|
USER ${DOCKER_USER}
|
|
|
|
COPY prepare_manylinux_node.sh prepare_manylinux_node.sh
|
|
RUN cp /prepare_manylinux_node.sh $HOME/ && \
|
|
cd $HOME && \
|
|
./prepare_manylinux_node.sh ${ARCH}
|