feat: py sandbox for workflow
* chore: update Dockerfile and sandbox.py * feat: py sandbox for workflow * feat: py sandbox for workflow See merge request: !885
This commit is contained in:
@@ -60,6 +60,7 @@ deactivate
|
||||
PARSER_SCRIPT_ROOT="$BACKEND_DIR/infra/impl/document/parser/builtin"
|
||||
PDF_PARSER="$PARSER_SCRIPT_ROOT/parse_pdf.py"
|
||||
DOCX_PARSER="$PARSER_SCRIPT_ROOT/parse_docx.py"
|
||||
WORKFLOW_SANBOX="$BACKEND_DIR/infra/impl/coderunner/script/sandbox.py"
|
||||
|
||||
if [ -f "$PDF_PARSER" ]; then
|
||||
cp "$PDF_PARSER" "$BIN_DIR/parse_pdf.py"
|
||||
@@ -75,7 +76,9 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -f "$WORKFLOW_SANBOX" ]; then
|
||||
cp "$WORKFLOW_SANBOX" "$BIN_DIR/sandbox.py"
|
||||
else
|
||||
echo "❌ $WORKFLOW_SANBOX file not found"
|
||||
exit 1
|
||||
fi
|
||||
@@ -7,6 +7,15 @@ BIN_DIR="$BASE_DIR/bin"
|
||||
CONFIG_DIR="$BIN_DIR/resources/conf"
|
||||
RESOURCES_DIR="$BIN_DIR/resources/"
|
||||
DOCKER_DIR="$BASE_DIR/docker"
|
||||
source "$DOCKER_DIR/.env"
|
||||
|
||||
if [[ "$CODE_RUNNER_TYPE" == "sandbox" ]] && ! command -v deno &> /dev/null; then
|
||||
echo "deno is not installed, installing now..."
|
||||
curl -fsSL https://deno.land/install.sh | sh
|
||||
export PATH="$HOME/.deno/bin:$PATH"
|
||||
fi
|
||||
|
||||
echo "🧹 Checking for sandbo availability..."
|
||||
|
||||
echo "🧹 Checking for goimports availability..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user