diff --git a/.github/workflows/concrete_python_benchmark.yml b/.github/workflows/concrete_python_benchmark.yml index 657cd6c80..8db067430 100644 --- a/.github/workflows/concrete_python_benchmark.yml +++ b/.github/workflows/concrete_python_benchmark.yml @@ -60,7 +60,7 @@ jobs: run: | set -e - export PYTHON=python + export PYTHON=python3.10 cd /concrete/frontends/concrete-python make PYTHON=$PYTHON venv diff --git a/.github/workflows/concrete_python_release.yml b/.github/workflows/concrete_python_release.yml index 5a658173d..64961fd5b 100644 --- a/.github/workflows/concrete_python_release.yml +++ b/.github/workflows/concrete_python_release.yml @@ -61,7 +61,7 @@ jobs: build-linux-x86: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] hw: ["cpu", "gpu"] needs: setup-instance runs-on: ${{ needs.setup-instance.outputs.runner-name }} @@ -249,7 +249,7 @@ jobs: needs: check-duplicate-nightly strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] runs-on: ["aws-mac1-metal", "aws-mac2-metal"] runs-on: ${{ matrix.runs-on }} steps: @@ -280,9 +280,6 @@ jobs: cat frontends/concrete-python/version.txt >> frontends/concrete-python/concrete/fhe/version.py - name: Build wheel run: | - # Hack for mac2 host... - export PATH=$PATH:/Users/ec2-user/.cargo/bin:/Users/ec2-user/.pyenv/versions/3.8.20/bin - CONCRETE_PYTHON=$(pwd)/frontends/concrete-python CONCRETE_COMPILER=$(pwd)/compilers/concrete-compiler/compiler export COMPILER_BUILD_DIRECTORY=$CONCRETE_COMPILER/build @@ -472,7 +469,7 @@ jobs: continue-on-error: true strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] runs-on: ${{ needs.setup-instance.outputs.runner-name }} steps: # HOME is needed by actions-rs/toolchain @@ -577,7 +574,7 @@ jobs: test-linux-x86-gpu: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] fail-fast: false needs: [setup-gpu-test-instance, build-linux-x86] runs-on: ${{ needs.setup-gpu-test-instance.outputs.runner-name }} @@ -662,7 +659,7 @@ jobs: continue-on-error: true strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] runs-on: ["aws-mac1-metal", "aws-mac2-metal"] runs-on: ${{ matrix.runs-on }} outputs: diff --git a/.github/workflows/concrete_python_tests_linux.yml b/.github/workflows/concrete_python_tests_linux.yml index 58fc7a317..ac1f807ba 100644 --- a/.github/workflows/concrete_python_tests_linux.yml +++ b/.github/workflows/concrete_python_tests_linux.yml @@ -58,8 +58,12 @@ jobs: runs-on: ${{ needs.setup-instance.outputs.runner-name }} strategy: matrix: - # we will use 3.8 for tests, and 3.10 for docs checking (3.8 doesn't work for now, TODO reactivate) - python-version: ["3.10"] + # we will use 3.9 for tests, and 3.10 for docs checking + include: + - python-version: "3.9" + python-executable: "/opt/python/cp39-cp39/bin/python" + - python-version: "3.10" + python-executable: "/opt/python/cp310-cp310/bin/python" steps: - name: Checkout concrete uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -69,41 +73,7 @@ jobs: - name: Create concrete build directory run: mkdir build - - name: Build concrete-compiler python bindings (3.8) - if: ${{ matrix.python-version == '3.8' }} - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 - with: - registry: ghcr.io - image: ${{ env.DOCKER_IMAGE_TEST }} - username: ${{ secrets.GHCR_LOGIN }} - password: ${{ secrets.GHCR_PASSWORD }} - options: >- - -v ${{ github.workspace }}:/concrete - -v ${{ github.workspace }}/build:/build - shell: bash - run: | - set -e - - cd /concrete/frontends/concrete-python - make venv - source .venv/bin/activate - - cd /concrete/compilers/concrete-compiler/compiler - make BUILD_DIR=/build DATAFLOW_EXECUTION_ENABLED=ON CCACHE=ON Python3_EXECUTABLE=$(which python) python-bindings - - echo "Debug: ccache statistics (after the build):" - ccache -s - - for f in $(find /build/tools/concretelang/python_packages/concretelang_core/ -type l); - do - cp --remove-destination $(readlink -e $f) $f - done - - cd /concrete/frontends/concrete-python - export COMPILER_BUILD_DIRECTORY="/build" - make whl - - name: Build concrete-compiler python bindings (3.10) - if: ${{ matrix.python-version == '3.10' }} + - name: Build concrete-compiler python bindings uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: registry: ghcr.io @@ -121,7 +91,7 @@ jobs: ccache -p cd /concrete/frontends/concrete-python - make PYTHON=/opt/python/cp310-cp310/bin/python venv + make PYTHON=${{ matrix.python-executable }} venv source .venv/bin/activate python -m pip install -r /concrete/third_party/llvm-project/mlir/python/requirements.txt @@ -211,7 +181,8 @@ jobs: needs: [setup-instance, build-python-bindings] runs-on: ${{ needs.setup-instance.outputs.runner-name }} env: - python-version: "3.8" + python-version: "3.9" + python-executable: "/opt/python/cp39-cp39/bin/python" steps: - name: Checkout concrete uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -238,7 +209,7 @@ jobs: set -e export COMPILER_BUILD_DIRECTORY=/compiler-artifacts cd /concrete/frontends/concrete-python - make venv + make PYTHON=${{ env.python-executable }} venv source .venv/bin/activate export KEY_CACHE_DIRECTORY=./key-set-cache mkdir $KEY_CACHE_DIRECTORY @@ -254,6 +225,9 @@ jobs: test-notebooks: needs: [setup-instance, build-python-bindings] runs-on: ${{ needs.setup-instance.outputs.runner-name }} + env: + python-version: "3.9" + python-executable: "/opt/python/cp39-cp39/bin/python" steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -263,7 +237,7 @@ jobs: - name: Download concrete-compiler python-bindings uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: concrete-compiler-python-bindings-3.8 + name: concrete-compiler-python-bindings-${{ env.python-version }} path: compiler-artifacts - name: Run pytest uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 @@ -280,7 +254,7 @@ jobs: set -e export COMPILER_BUILD_DIRECTORY=/compiler-artifacts cd /concrete/frontends/concrete-python - make venv + make PYTHON=${{ env.python-executable }} venv source .venv/bin/activate make test-notebooks - name: Slack Notification diff --git a/README.md b/README.md index ab3b73d3f..357c444d8 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Concrete is a versatile library that can be used for a variety of purposes. For ## Getting Started ### System Requirements -- Python 3.8 - 3.12 +- Python 3.9 - 3.12 - 8GB RAM minimum (16GB recommended) - x86_64 or ARM64 processor @@ -93,6 +93,7 @@ docker pull zamafhe/concrete-python:v2.0.0-gpu | Concrete Version | Python Version | CUDA Support | |-----------------|----------------|--------------| +| 2.11.0 | 3.9 - 3.12 | ≥ 11.8 | | 2.0.0 | 3.8 - 3.12 | ≥ 11.8 | | 1.1.0 | 3.8 - 3.10 | ≥ 11.7 | diff --git a/compilers/concrete-compiler/compiler/README.md b/compilers/concrete-compiler/compiler/README.md index 4f30f0c56..9b2fcdd2e 100644 --- a/compilers/concrete-compiler/compiler/README.md +++ b/compilers/concrete-compiler/compiler/README.md @@ -147,7 +147,7 @@ You can create a tarball containing libs, bins, and include files for the tools > The wheel built in the following steps is for `concrete-compiler` (which doesn't have the frontend layer) and not `concrete-python`. If you are interested in the `concrete-python` package, then you should build it from [here](https://github.com/zama-ai/concrete/tree/main/frontends/concrete-python) instead. Currently supported platforms: -- Linux x86_64 for python 3.8, 3.9, 3.10, and 3.11 +- Linux x86_64 for python 3.9, 3.10, 3.11, and 3.12 pybind11 is required to build the python package, you can install it in your current environment with: diff --git a/docker/Dockerfile.concrete-compiler-env b/docker/Dockerfile.concrete-compiler-env index 1e1669630..c3266236f 100644 --- a/docker/Dockerfile.concrete-compiler-env +++ b/docker/Dockerfile.concrete-compiler-env @@ -48,7 +48,7 @@ RUN mkdir /boost/ && \ rm -rf /boost # Set the python path. Options: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, ...] # Links and env would be available to use the appropriate python version -ARG python_tag=cp38-cp38 +ARG python_tag=cp39-cp39 RUN ln -s /opt/python/${python_tag}/bin/pip /bin/pip && ln -s /opt/python/${python_tag}/bin/python /bin/python ENV PYTHON_EXEC=/opt/python/${python_tag}/bin/python # Install python deps diff --git a/docs/compilation/common_errors.md b/docs/compilation/common_errors.md index 34dfa2abb..cf841b78c 100644 --- a/docs/compilation/common_errors.md +++ b/docs/compilation/common_errors.md @@ -9,7 +9,7 @@ This document explains the most common errors and provides solutions to fix them **Cause**: The installation does not work fine for you. **Possible solutions**: -- Be sure that you use a supported Python version (currently from 3.8 to 3.12, included). +- Be sure that you use a supported Python version (currently from 3.9 to 3.12, included). - Check that you have done `pip install -U pip wheel setuptools` before. - Consider adding a `--extra-index-url https://pypi.zama.ai/cpu` or `--extra-index-url https://pypi.zama.ai/gpu`, depending on whether you want the CPU or the GPU wheel. - Concrete requires glibc>=2.28, be sure to have a sufficiently recent version. diff --git a/docs/get-started/installing.md b/docs/get-started/installing.md index 9b7023933..cf67db9a3 100644 --- a/docs/get-started/installing.md +++ b/docs/get-started/installing.md @@ -2,7 +2,7 @@ This document explains the steps to install **Concrete** into your project. -**Concrete** is natively supported on Linux and macOS from Python 3.8 to 3.12 inclusive. If you have Docker in your platform, you can use the docker image to use **Concrete**. +**Concrete** is natively supported on Linux and macOS from Python 3.9 to 3.12 inclusive. If you have Docker in your platform, you can use the docker image to use **Concrete**. ## Using PyPI diff --git a/frontends/concrete-python/.pylintrc b/frontends/concrete-python/.pylintrc index e9f7524b8..527bfdf18 100644 --- a/frontends/concrete-python/.pylintrc +++ b/frontends/concrete-python/.pylintrc @@ -88,7 +88,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.8 +py-version=3.9 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/frontends/concrete-python/.ruff.toml b/frontends/concrete-python/.ruff.toml index 1a697ad69..80840b8d2 100644 --- a/frontends/concrete-python/.ruff.toml +++ b/frontends/concrete-python/.ruff.toml @@ -1,4 +1,4 @@ -target-version = "py38" +target-version = "py39" line-length = 100 select = [ "F", "E", "W", "C90", "I", "UP", "N", "YTT", "S", "BLE", "FBT", "B", "C4", diff --git a/frontends/concrete-python/setup.py b/frontends/concrete-python/setup.py index 3b23c92ac..5f8d28412 100644 --- a/frontends/concrete-python/setup.py +++ b/frontends/concrete-python/setup.py @@ -69,7 +69,7 @@ setuptools.setup( long_description=read("../../README.md"), long_description_content_type="text/markdown", - python_requires=">=3.8", + python_requires=">=3.9", setup_requires=["wheel"], install_requires=read_requirements("requirements.txt"), extras_require={