Team Ai
Datasetpublic

Benjamin-eecs/openrsi-commit-runtime-assets

sourceHugging Faceupdated 16d agoView on Hugging Face
0likes168downloads
Dockerfile37 linesDownload Raw Back to environment
1# Auto-generated by Repo2RLEnv pr_runtime2FROM local/marshmallow-code__webargs3WORKDIR /workspace4# Defensive: ensure git is on PATH at build time. Bootstrap base5# images vary — some (Python slim) don't ship git; some agents6# install it; others don't. Re-installing is a no-op when already7# present. Tries apt-get first (Debian/Ubuntu), then apk (Alpine).8# Install git + ca-certificates. Minimal images (node:alpine) ship9# without CA certs, so HTTPS git fetch fails verification.10RUN (command -v git >/dev/null 2>&1 && [ -e /etc/ssl/certs/ca-certificates.crt ]) || \11    (apt-get update && apt-get install -y --no-install-recommends git ca-certificates \12     && rm -rf /var/lib/apt/lists/*) || \13    (apk add --no-cache git ca-certificates && update-ca-certificates) || true14# Defensive: the graded F2P/P2P verifier is Python.15# Language-specific bootstrap images (Go/Rust/Node) may not16# ship python3 — install it so test.sh can score F2P/P2P. No-op when17# python3 is already present (every Python-repo image has it).18RUN command -v python3 >/dev/null 2>&1 || \19    (apt-get update && apt-get install -y --no-install-recommends python3 \20     && rm -rf /var/lib/apt/lists/*) || \21    apk add --no-cache python3 || true22# Position the working tree at the PR's base commit so subsequent23# model-patch applications align with the line context the patch24# was authored against. The fetch is a no-op if the commit is25# already in the shallow clone.26RUN git config --global --add safe.directory /workspace \27    && git fetch --depth 1 origin 44e2037a5607f3655f47d475272eab01d49aaaa0 2>/dev/null \28       || git fetch --unshallow origin 2>/dev/null || true29RUN git reset --hard 44e2037a5607f3655f47d475272eab01d49aaaa0 && git clean -fdx -e .venv -e venv -e __pycache__ -e .tox -e node_modules -e target -e vendor -e .gradle -e .next -e .pytest_cache30RUN git checkout -q -B base 44e2037a5607f3655f47d475272eab01d49aaaa0 \31    && git remote remove origin 2>/dev/null || true32RUN for ref in $(git branch --format='%(refname:short)' | grep -vx base); do git branch -D "$ref" 2>/dev/null || true; done \33    && git tag -l | xargs -r git tag -d >/dev/null 2>&1 || true \34    && git for-each-ref --format='%(refname)' refs/remotes 2>/dev/null | xargs -r -n1 git update-ref -d 2>/dev/null || true \35    && git reflog expire --expire=now --all 2>/dev/null || true \36    && git gc --prune=now 2>/dev/null || true37