-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Lock GitHub runners' OS (#1765)
* build: Lock GitHub runners' OS This was motivated by our macOS jobs failing [2] because colima is missing. It looks like this is because the latest versions of the macOS runner no longer have colima installed by default [1]. colima is now explicitly installed. [1] actions/runner-images#6216 [2] `/Users/runner/work/_temp/f19ffbff-27a9-4fc7-80b6-97791d2de141.sh: line 9: colima: command not found` * build: Lock Colima * build: Move macOS Docker installation to script * build: Move macOS libomp activation to script * build: Use latest Colima The > 0.6.0 releases actually fix the issue we have linked [1][2][3]. [1] abiosoft/colima#577 [2] https://github.com/jesse-c/MLServer/blob/c3acd60995a72141027eff506e4fd330fe824179/hack/install-docker-macos.sh#L18-L20 [3] > Switch to new user-v2 network. Fixes abiosoft/colima#648, abiosoft/colima#603, abiosoft/colima#577, abiosoft/colima#779, abiosoft/colima#137, abiosoft/colima#740.
- Loading branch information
Jesse Claven
authored
May 30, 2024
1 parent
fcce136
commit ab1f3f7
Showing
3 changed files
with
99 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeuo pipefail | ||
|
||
export LDFLAGS="-L/usr/local/opt/libomp/lib" | ||
export CPPFLAGS="-I/usr/local/opt/libomp/include" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeuo pipefail | ||
|
||
# Install Docker | ||
# From https://github.com/actions/runner-images/issues/17#issuecomment-1537238473 | ||
# From https://github.com/abiosoft/colima/discussions/273#discussioncomment-4959736 | ||
brew install docker docker-buildx | ||
mkdir -p $HOME/.docker/cli-plugins | ||
ln -sfn $(which docker-buildx) $HOME/.docker/cli-plugins/docker-buildx | ||
|
||
# Install Lima | ||
brew install lima | ||
# Don't explicitly start Lima here (e.g. with `limactl start`). | ||
# Let Colina do that, otherwise, # Colima seems to hang | ||
# waiting for the SSH requirement to be met. | ||
|
||
# Install Colima | ||
sudo mkdir -p /usr/local/bin | ||
sudo curl -L -o /usr/local/bin/colima https://github.com/abiosoft/colima/releases/download/v0.6.9/colima-Darwin-x86_64 && sudo chmod +x /usr/local/bin/colima | ||
colima start --memory 5 --runtime docker | ||
|
||
# Link Colima and Docker | ||
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock |