M1: processor CLI

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
lucioandClaude Opus 5.5 committed 2026-11-04 04:07:45 -08:00
commit 18a397653a
21 files changed
+2775

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
FROM ubuntu:24.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends golang-go libvips-tools ca-certificates git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -euo pipefail
scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_dir="$(dirname "$scripts_dir")"
image="${LUPHOTO_DEV_IMAGE:-luphoto-dev}"
case "$(uname -s)" in
MINGW*|MSYS*|CYGWIN*)
export MSYS_NO_PATHCONV=1
scripts_host="$(cygpath -w "$scripts_dir")"
repo_host="$(cygpath -w "$repo_dir")"
;;
*)
scripts_host="$scripts_dir"
repo_host="$repo_dir"
;;
esac
if [ "${LUPHOTO_DEV_REBUILD:-0}" = "1" ] || ! docker image inspect "$image" >/dev/null 2>&1; then
docker build -t "$image" -f "$scripts_host/dev.Dockerfile" "$scripts_host"
fi
tty_args=()
if [ -t 0 ] && [ -t 1 ]; then
tty_args=(-it)
fi
extra_args=()
if [ -n "${LUPHOTO_DEV_ARGS:-}" ]; then
read -r -a extra_args <<<"$LUPHOTO_DEV_ARGS"
fi
if [ "$#" -eq 0 ]; then
set -- bash
fi
exec docker run --rm "${tty_args[@]}" \
-v "$repo_host:/src" \
-v luphoto-gomod:/root/go/pkg/mod \
-v luphoto-gocache:/root/.cache/go-build \
-e GOFLAGS="${GOFLAGS:-}" \
-w /src \
"${extra_args[@]}" \
"$image" "$@"