mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 22:07:15 +01:00
Runs a solution (python3, javascript, typescript) against statement examples in bubblewrap: no network, read-only root, scratch dir, rlimits and a per-example timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWYGW5NZL5uVpnqmNKo
13 lines
437 B
Bash
Executable File
13 lines
437 B
Bash
Executable File
#!/bin/bash
|
|
# Editable user install so /usr/bin/python3 (the tutor server, the CLI) can
|
|
# `import code_runner`. Stdlib only; idempotent.
|
|
set -euo pipefail
|
|
|
|
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
readonly REPO_DIR
|
|
readonly SYSTEM_PYTHON="/usr/bin/python3"
|
|
|
|
"$SYSTEM_PYTHON" -m pip install --user --no-deps --break-system-packages -e "$REPO_DIR"
|
|
cd /
|
|
"$SYSTEM_PYTHON" -c 'import code_runner; print(code_runner.__file__)'
|