Skip to content

Move CI to Python 3.11, with the version set in .python-version - #49311

Merged
tarekziade merged 5 commits into
mainfrom
ci-images-python-3.11
Oct 6, 2026
Merged

tarekziade merged 5 commits into
mainfrom
ci-images-python-3.11

Conversation

@tarekziade

@tarekziade tarekziade commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

CPU CI GPU run-slow

What does this PR do?

  • .python-version is the single source of the CI Python version.
  • GitHub Actions workflows use python-version-file: .python-version.
  • The CPU CI images now build on a shared docker/ci-base.dockerfile via docker/docker-bake.hcl; the build workflows pass PYTHON_VERSION from .python-version. Same for the doc-builder image.
  • consistency image: pypi-kenlm doesn't build on 3.11, use kenlm (needs cmake).
  • check_circleci_user only runs shell, use cimg/base:stable.

- `.python-version` is the single source of the CI Python version.
- GitHub Actions workflows use `python-version-file: .python-version`.
- The CPU CI images now build on a shared `docker/ci-base.dockerfile`
  via `docker/docker-bake.hcl`; the build workflows pass
  `PYTHON_VERSION` from `.python-version`. Same for the doc-builder image.
- consistency image: `pypi-kenlm` doesn't build on 3.11, use `kenlm`
  (needs cmake).
- `check_circleci_user` only runs shell, use `cimg/base:stable`.
Comment thread .python-version
@@ -0,0 +1 @@
3.11

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ydshieh Adding this file, that should have minimal impact for developers, but if you want we can move it to docker/

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

fix(ci): harden workflow files flagged on #49311

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>

@ydshieh ydshieh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

Comment thread .circleci/config.yml
# Ensure running with CircleCI/huggingface
check_circleci_user:
docker:
- image: python:3.10-slim

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not bother to touch this. circleci is not used anymore.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even for branch releases? also, if not used anymore should we delete it?

@tarekziade
tarekziade enabled auto-merge October 6, 2026 09:44
@tarekziade
tarekziade added this pull request to the merge queue Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 37335640180:1
Result: success | Jobs: 3 | Tests: 230 | Failures: 0 | Duration: 2m 29s

Merged via the queue into main with commit 422bd07 Oct 6, 2026
53 checks passed
@tarekziade
tarekziade deleted the ci-images-python-3.11 branch October 6, 2026 09:56
ydshieh added a commit that referenced this pull request Oct 20, 2026
)

Add /opt/venv/bin to PATH in SSH runner env setup

New GPU docker images (Python 3.11 migration, PR #49311) install packages
into a uv-managed venv at /opt/venv, with PATH set via Dockerfile ENV.
CI jobs inherit this correctly, but interactive SSH sessions start a fresh
shell that doesn't source Docker ENV vars, so python3/pip/pytest are not
found.

Safe for all images: prepending a non-existent directory to PATH is a no-op.

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants