mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76)
This commit is contained in:
parent
bfb064024e
commit
39bdedab9c
7 changed files with 89 additions and 28 deletions
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE=gemini-code-sandbox
|
||||
CLI_DIST=/usr/local/share/npm-global/lib/node_modules/\@gemini-code/cli
|
||||
WORKDIR=/sandbox/$(basename "$PWD")
|
||||
|
||||
# use docker if installed, otherwise try to use podman instead
|
||||
if command -v docker &> /dev/null; then
|
||||
CMD=docker
|
||||
elif command -v podman &> /dev/null; then
|
||||
CMD=podman
|
||||
else
|
||||
echo "ERROR: docker or podman must be installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CMD run -it --rm -v"$PWD:$WORKDIR" --workdir "$WORKDIR" "$IMAGE" node "$CLI_DIST"
|
||||
Loading…
Add table
Add a link
Reference in a new issue