Download tests/python-runtime-container.sh from Omnixela/npt-connector: direct link, hf CLI and curl.
- Browser
- Download file 837 Bytes
-
https://huggingface.co/Omnixela/npt-connector/resolve/main/tests/python-runtime-container.sh
- Command line
-
hf download hf://Omnixela/npt-connector/tests/python-runtime-container.sh
-
curl -L -o python-runtime-container.sh https://huggingface.co/Omnixela/npt-connector/resolve/main/tests/python-runtime-container.sh
837 Bytes
| set -euo pipefail | |
| RUNNER_IMAGE="${RUNNER_IMAGE:-z-ai-python-deploy-runner:test}" | |
| SCRIPT_DIR="$(cd "$(dirname "$0")/../.zscripts" && pwd)" | |
| TEST_ROOT="$(mktemp -d)" | |
| trap 'rm -rf "$TEST_ROOT"' EXIT | |
| PROJECT_DIR="$TEST_ROOT/project" | |
| BUILD_DIR="$TEST_ROOT/build" | |
| mkdir -p "$PROJECT_DIR" "$BUILD_DIR/next-service-dist" | |
| cat >"$PROJECT_DIR/requirements.txt" <<'EOF' | |
| idna==3.10 | |
| EOF | |
| cat >"$PROJECT_DIR/check_runtime.py" <<'EOF' | |
| import idna | |
| assert idna.__version__ == "3.10" | |
| print("python artifact import passed") | |
| EOF | |
| PROJECT_DIR="$PROJECT_DIR" BUILD_DIR="$BUILD_DIR" \ | |
| bash "$SCRIPT_DIR/python-runtime-build.sh" | |
| docker run --rm \ | |
| --entrypoint sh \ | |
| -v "$BUILD_DIR:/app" \ | |
| "$RUNNER_IMAGE" \ | |
| -c 'PYTHONPATH=/app/python-runtime/site-packages:/app/next-service-dist python /app/next-service-dist/check_runtime.py' | |