Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ aswfdocker --verbose build --ci-image-type IMAGE --group vfx1 --version 2026 --t
aswfdocker build --ci-image-type aswftesting/ci-openexr:2026
```

### Building on macOS

Native macOS support is our goal, but due to limited resources, active development is intermittent. In the meantime, our existing build workflows only build Linux artifacts on macOS: `aswfdocker` drives Linux containers (for example `linux/amd64` images and Conan packages for Linux), not native macOS toolchains.

Configure Docker with a minimum of:

- 8 CPU cores allocated to Docker
- 16 GB of memory allocated to Docker

Due to conflicts with Rosetta, [buildx](https://docs.docker.com/buildx/working-with-buildx/) should be run on the Docker VMM.

### Windows Considerations

Native Windows support is our goal, but due to limited resources, active development is intermittent. In the meantime, our existing build workflows work under WSL.
Expand All @@ -272,7 +283,6 @@ Native Windows support is our goal, but due to limited resources, active develop

[Here](https://docs.astral.sh/uv/) are the `uv` docs.


## Use Cases

### GitHub Actions
Expand Down
5 changes: 5 additions & 0 deletions python/aswfdocker/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"""
CI Image and Package Builder
"""

import logging
import subprocess
import json
import os
import sys
import tempfile
import typing

Expand Down Expand Up @@ -114,6 +116,9 @@ def make_bake_dict(
"id=conan_password,env=CONAN_PASSWORD",
],
}
# Docker Desktop on Apple Silicon defaults to linux/arm64; pin amd64 to match CI.
if sys.platform == "darwin":
target_dict["platforms"] = ["linux/amd64"]
root["target"][f"{image}-{major_version}"] = target_dict

root["group"] = {"default": {"targets": list(root["target"].keys())}}
Expand Down
40 changes: 40 additions & 0 deletions python/aswfdocker/tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import unittest
import logging
import tempfile
from unittest.mock import patch

from click.testing import CliRunner

Expand All @@ -22,6 +23,43 @@ def setUp(self):
repo_uri="notauri", source_branch="testing", aswf_version="2024.123"
)

@patch.object(builder.sys, "platform", "darwin")
def test_bake_dict_sets_linux_amd64_platform_on_macos(self):
"""Match CI arch on Docker Desktop (Apple Silicon defaults to linux/arm64)."""
b = builder.Builder(
self.build_info,
groupinfo.GroupInfo(
names=["base"],
versions=["2019"],
type_=constants.ImageType.IMAGE,
targets=[],
),
)
baked = b.make_bake_dict(False, False)
self.assertEqual(
baked["target"]["ci-base-2019"]["platforms"],
["linux/amd64"],
)

def test_bake_dict_omits_platforms_when_not_darwin(self):
b = builder.Builder(
self.build_info,
groupinfo.GroupInfo(
names=["base"],
versions=["2019"],
type_=constants.ImageType.IMAGE,
targets=[],
),
)
for plat in ("linux", "win32"):
with patch.object(builder.sys, "platform", plat):
baked = b.make_bake_dict(False, False)
self.assertNotIn(
"platforms",
baked["target"]["ci-base-2019"],
msg=f"host sys.platform={plat!r}",
)

def test_package_opentimelineio_2019_dict(self):
b = builder.Builder(
self.build_info,
Expand Down Expand Up @@ -82,6 +120,7 @@ def test_image_base_2019_dict(self):
baked["target"]["ci-base-2019"]["args"]["ASWF_VERSION"], base_version
)

@patch.object(builder.sys, "platform", "linux")
def test_image_base_2019clang_dict(self):
b = builder.Builder(
self.build_info,
Expand Down Expand Up @@ -174,6 +213,7 @@ def test_image_base_2019clang_dict(self):
},
)

@patch.object(builder.sys, "platform", "linux")
def test_image_base_2019_2020_dict(self):
b = builder.Builder(
self.build_info,
Expand Down
Loading