Skip to content

Commit d5b6f31

Browse files
committed
Work around OOM issues with arm64 docker container
1 parent bea8715 commit d5b6f31

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/build-wheels.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/bin/bash
22
set -e -x
33

4+
# update rust
45
curl https://sh.rustup.rs -sSf | sh -s -- -y
56
source $HOME/.cargo/env
67
rustup default stable
78

9+
# Workaround for OOM issues, https://github.com/rust-lang/cargo/issues/10583
10+
echo "[net]" >> "$HOME/.cargo/config.toml"
11+
echo "git-fetch-with-cli = true" >> "$HOME/.cargo/config.toml"
12+
813
# build wheels
914
for PYBIN in /opt/python/cp3[891]*/bin; do
1015
"${PYBIN}/pip" install -r requirements.txt -r requirements-dev.txt

.github/workflows/wheels.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
- uses: actions/checkout@v3
3838
- name: Install QEMU
3939
run: |
40-
docker run --privileged --rm tonistiigi/binfmt --install all
40+
docker run --privileged --rm tonistiigi/binfmt --install arm64
4141
- name: Build wheels
4242
run: |
43-
docker run --workdir /src -v ${PWD}:/src ${{ matrix.container }} /bin/bash .github/workflows/build-wheels.sh
43+
docker run --platform linux/arm64 --workdir /src -v ${PWD}:/src ${{ matrix.container }} /bin/bash .github/workflows/build-wheels.sh
4444
- uses: actions/upload-artifact@v3
4545
with:
4646
name: wheels
@@ -91,7 +91,6 @@ jobs:
9191
python-version: ${{ matrix.python-version }}
9292
- name: Build wheels
9393
run: |
94-
rustup target add
9594
python -m pip install -r requirements.txt -r requirements-dev.txt
9695
maturin build --release --strip
9796
python -m pip install kmedoids --no-index --find-links target/wheels

0 commit comments

Comments
 (0)