| 1 | #!/bin/bash |
| 2 | set -e |
| 3 | ARCH=${1:-x86_64} |
| 4 | |
| 5 | # We pass down the current user so that when we later mount the local files |
| 6 | # into the container, the files are accessible by the current user. |
| 7 | pushd ci/manylinux_node |
| 8 | docker build \ |
| 9 | -t lancedb-node-manylinux-$ARCH \ |
| 10 | --build-arg="ARCH=$ARCH" \ |
| 11 | --build-arg="DOCKER_USER=$(id -u)" \ |
| 12 | --progress=plain \ |
| 13 | . |
| 14 | popd |
| 15 | |
| 16 | # We turn on memory swap to avoid OOM killer |
| 17 | docker run \ |
| 18 | -v $(pwd):/io -w /io \ |
| 19 | --memory-swap=-1 \ |
| 20 | lancedb-node-manylinux-$ARCH \ |
| 21 | bash ci/manylinux_node/build_lancedb.sh $ARCH |