Skip to content

Commit 7dcb98f

Browse files
committed
add run version in code-interpreter skills.md
1 parent efab87f commit 7dcb98f

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/code-interpreter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
PIP_PACKAGES=${{ env.PIP_PACKAGES }}
110110
NPM_GLOBAL_PACKAGES=${{ env.NPM_GLOBAL_PACKAGES }}
111111
NUGET_PRECACHE=${{ env.NUGET_PRECACHE }}
112+
RUN_NUMBER=${{ github.run_number }}
112113
tags: ${{ vars.DOCKER_REGISTRY }}/${{ vars.DOCKER_NAMESPACE }}/${{ env.IMAGE_NAME }}:r-${{ github.run_number }}-${{ matrix.tag }}
113114

114115
- name: Smoke test

.github/workflows/code-interpreter/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ARG APT_PACKAGES
44
ARG PIP_PACKAGES
55
ARG NPM_GLOBAL_PACKAGES
66
ARG NUGET_PRECACHE
7+
ARG RUN_NUMBER
78

89
RUN apt-get update \
910
&& apt-get install -y ${APT_PACKAGES} \
@@ -17,6 +18,7 @@ RUN pip install --break-system-packages ${PIP_PACKAGES} \
1718
&& mv /usr/local/bin/playwright-python /usr/local/bin/playwright
1819

1920
ENV PRECACHE_PACKAGES="${NUGET_PRECACHE}"
21+
ENV RUN_NUMBER="${RUN_NUMBER}"
2022
ENV NODE_PATH=/usr/local/lib/node_modules
2123

2224
COPY matplotlibrc /root/.config/matplotlib/matplotlibrc

.github/workflows/code-interpreter/render-skills.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import re
33
import subprocess
44
import sys
5+
import os
56
from pathlib import Path
67

78

@@ -58,13 +59,15 @@ def main() -> int:
5859
ff = ffmpeg_version()
5960
gcc = gcc_version()
6061
node = node_version()
62+
run_number = os.getenv("RUN_NUMBER", "unknown")
6163

6264
rendered = template
6365
rendered = rendered.replace("{dotnetVersion}", dn)
6466
rendered = rendered.replace("{pythonVersion}", py)
6567
rendered = rendered.replace("{ffmpegVersion}", ff)
6668
rendered = rendered.replace("{gccVersion}", gcc)
6769
rendered = rendered.replace("{nodeVersion}", node)
70+
rendered = rendered.replace("{runNumber}", run_number)
6871

6972
output_path.parent.mkdir(parents=True, exist_ok=True)
7073
output_path.write_text(rendered.rstrip() + "\n", encoding="utf-8")

.github/workflows/code-interpreter/skills.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This environment is pre-configured with the following tools and libraries:
1+
This environment (rv. #{runNumber}) is pre-configured with the following tools and libraries:
22
* utilities: git, LibreOffice, Pandoc, Poppler (`pdftotext`, `pdfinfo`), sqlite3, file, FFmpeg {ffmpegVersion}, git, imagemagick, playwright[chromium], playwright-node
33
* dotnet {dotnetVersion}, commands: `dotnet build`, `dotnet run single-file.cs`, `dotnet add package`, pre-cached NuGet packages in `/opt/nuget-local`
44
* python {pythonVersion}, commands: `python3 - <<'PY' ...`, `pip install --break-system-packages package-name`, IMPORTANT: Many packages are pre-installed, Always check with `pip list` BEFORE installing to avoid unnecessary waits.

0 commit comments

Comments
 (0)