mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 04:03:31 +00:00
feat: gigacode (#92)
This commit is contained in:
parent
0a73d1d8e8
commit
a02393436c
40 changed files with 2736 additions and 1327 deletions
|
|
@ -17,30 +17,35 @@ case $TARGET in
|
|||
DOCKERFILE="linux-x86_64.Dockerfile"
|
||||
TARGET_STAGE="x86_64-builder"
|
||||
BINARY="sandbox-agent-$TARGET"
|
||||
GIGACODE="gigacode-$TARGET"
|
||||
;;
|
||||
aarch64-unknown-linux-musl)
|
||||
echo "Building for Linux aarch64 musl"
|
||||
DOCKERFILE="linux-aarch64.Dockerfile"
|
||||
TARGET_STAGE="aarch64-builder"
|
||||
BINARY="sandbox-agent-$TARGET"
|
||||
GIGACODE="gigacode-$TARGET"
|
||||
;;
|
||||
x86_64-pc-windows-gnu)
|
||||
echo "Building for Windows x86_64"
|
||||
DOCKERFILE="windows.Dockerfile"
|
||||
TARGET_STAGE=""
|
||||
BINARY="sandbox-agent-$TARGET.exe"
|
||||
GIGACODE="gigacode-$TARGET.exe"
|
||||
;;
|
||||
x86_64-apple-darwin)
|
||||
echo "Building for macOS x86_64"
|
||||
DOCKERFILE="macos-x86_64.Dockerfile"
|
||||
TARGET_STAGE="x86_64-builder"
|
||||
BINARY="sandbox-agent-$TARGET"
|
||||
GIGACODE="gigacode-$TARGET"
|
||||
;;
|
||||
aarch64-apple-darwin)
|
||||
echo "Building for macOS aarch64"
|
||||
DOCKERFILE="macos-aarch64.Dockerfile"
|
||||
TARGET_STAGE="aarch64-builder"
|
||||
BINARY="sandbox-agent-$TARGET"
|
||||
GIGACODE="gigacode-$TARGET"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported target: $TARGET"
|
||||
|
|
@ -59,10 +64,13 @@ CONTAINER_ID=$(docker create "sandbox-agent-builder-$TARGET")
|
|||
mkdir -p dist
|
||||
|
||||
docker cp "$CONTAINER_ID:/artifacts/$BINARY" "dist/"
|
||||
docker cp "$CONTAINER_ID:/artifacts/$GIGACODE" "dist/"
|
||||
docker rm "$CONTAINER_ID"
|
||||
|
||||
if [[ "$BINARY" != *.exe ]]; then
|
||||
chmod +x "dist/$BINARY"
|
||||
chmod +x "dist/$GIGACODE"
|
||||
fi
|
||||
|
||||
echo "Binary saved to: dist/$BINARY"
|
||||
echo "Binary saved to: dist/$GIGACODE"
|
||||
|
|
|
|||
|
|
@ -66,9 +66,10 @@ COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/pac
|
|||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target aarch64-unknown-linux-musl && \
|
||||
cargo build -p sandbox-agent -p gigacode --release --target aarch64-unknown-linux-musl && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/aarch64-unknown-linux-musl/release/sandbox-agent /artifacts/sandbox-agent-aarch64-unknown-linux-musl
|
||||
cp target/aarch64-unknown-linux-musl/release/sandbox-agent /artifacts/sandbox-agent-aarch64-unknown-linux-musl && \
|
||||
cp target/aarch64-unknown-linux-musl/release/gigacode /artifacts/gigacode-aarch64-unknown-linux-musl
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
|
|
@ -100,9 +100,10 @@ COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/pac
|
|||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target x86_64-unknown-linux-musl && \
|
||||
cargo build -p sandbox-agent -p gigacode --release --target x86_64-unknown-linux-musl && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/x86_64-unknown-linux-musl/release/sandbox-agent /artifacts/sandbox-agent-x86_64-unknown-linux-musl
|
||||
cp target/x86_64-unknown-linux-musl/release/sandbox-agent /artifacts/sandbox-agent-x86_64-unknown-linux-musl && \
|
||||
cp target/x86_64-unknown-linux-musl/release/gigacode /artifacts/gigacode-x86_64-unknown-linux-musl
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
|
|
@ -98,9 +98,10 @@ COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/pac
|
|||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target aarch64-apple-darwin && \
|
||||
cargo build -p sandbox-agent -p gigacode --release --target aarch64-apple-darwin && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/aarch64-apple-darwin/release/sandbox-agent /artifacts/sandbox-agent-aarch64-apple-darwin
|
||||
cp target/aarch64-apple-darwin/release/sandbox-agent /artifacts/sandbox-agent-aarch64-apple-darwin && \
|
||||
cp target/aarch64-apple-darwin/release/gigacode /artifacts/gigacode-aarch64-apple-darwin
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
|
|
@ -98,9 +98,10 @@ COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/pac
|
|||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target x86_64-apple-darwin && \
|
||||
cargo build -p sandbox-agent -p gigacode --release --target x86_64-apple-darwin && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/x86_64-apple-darwin/release/sandbox-agent /artifacts/sandbox-agent-x86_64-apple-darwin
|
||||
cp target/x86_64-apple-darwin/release/sandbox-agent /artifacts/sandbox-agent-x86_64-apple-darwin && \
|
||||
cp target/x86_64-apple-darwin/release/gigacode /artifacts/gigacode-x86_64-apple-darwin
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
|
|
@ -84,9 +84,10 @@ COPY --from=inspector-build /app/frontend/packages/inspector/dist ./frontend/pac
|
|||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build -p sandbox-agent --release --target x86_64-pc-windows-gnu && \
|
||||
cargo build -p sandbox-agent -p gigacode --release --target x86_64-pc-windows-gnu && \
|
||||
mkdir -p /artifacts && \
|
||||
cp target/x86_64-pc-windows-gnu/release/sandbox-agent.exe /artifacts/sandbox-agent-x86_64-pc-windows-gnu.exe
|
||||
cp target/x86_64-pc-windows-gnu/release/sandbox-agent.exe /artifacts/sandbox-agent-x86_64-pc-windows-gnu.exe && \
|
||||
cp target/x86_64-pc-windows-gnu/release/gigacode.exe /artifacts/gigacode-x86_64-pc-windows-gnu.exe
|
||||
|
||||
# Default command to show help
|
||||
CMD ["ls", "-la", "/artifacts"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue