Files
transformers/docker/ci-base.dockerfile
Tarek Ziadeandhf-security-analysis[bot] 422bd07ed8 Move CI to Python 3.11, with the version set in .python-version (#49311)
* Move CI to Python 3.11, with the version set in `.python-version`

- `.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`.

* fix(ci): harden GitHub Actions workflows (#49311) (#49312)

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

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

* dev-ci

* [test all] [build-ci-image]

---------

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
2026-10-06 09:50:38 +00:00

12 lines
533 B
Docker

# check=skip=InvalidDefaultArgInFrom
# Common base for the CPU CI images (`*.dockerfile` in this folder).
# Build the images with `docker buildx bake` (see `docker-bake.hcl`), which feeds this
# stage to the other dockerfiles as the `ci-base` build context.
# `PYTHON_VERSION` comes from the repo's `.python-version`.
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
ENV UV_PYTHON=/usr/local/bin/python
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools