Skip to content

Commit 6f82003

Browse files
committed
MNT Remove Python 3.8 since it's end of life (#2135)
The end of life of Python 3.8 has arrived: https://devguide.python.org/versions/ Therefore, Python 3.8 is removed from CI. By default, Python 3.11 is now used. Python 3.12 should be added to the CI matrix now, but that's for a separate PR. Also fixed: The workflow tried to build on top of docker/README.md because globbing was too broadly defined. Reduce unnecessary steps to hopefully get disk space usage down, as GitHub action currently fails with not enough disk space.
1 parent 8766416 commit 6f82003

File tree

12 files changed

+29
-45
lines changed

12 files changed

+29
-45
lines changed

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Python
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: 3.8
23+
python-version: 3.11
2424

2525
- name: Install requirements
2626
run: |

.github/workflows/test-docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
paths:
66
# Run only when DockerFile files are modified
7-
- "docker/**"
7+
- "docker/*/Dockerfile"
88
jobs:
99
get_changed_files:
1010
name: "Build all modified docker images"
@@ -18,7 +18,7 @@ jobs:
1818
id: changed-files
1919
uses: tj-actions/changed-files@1c8e6069583811afb28f97afeaf8e7da80c6be5c #v42
2020
with:
21-
files: docker/**
21+
files: docker/*/Dockerfile
2222
json: "true"
2323
- name: Run step if only the files listed above change
2424
if: steps.changed-files.outputs.any_changed == 'true'

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: "3.8"
20+
python-version: "3.11"
2121
cache: "pip"
2222
cache-dependency-path: "setup.py"
2323
- name: Install dependencies
@@ -34,7 +34,7 @@ jobs:
3434
# TODO: remove 'fail-fast' line once timeout issue from the Hub is solved
3535
fail-fast: false
3636
matrix:
37-
python-version: ["3.8", "3.9", "3.10", "3.11"]
37+
python-version: ["3.9", "3.10", "3.11"]
3838
os: ["ubuntu-latest", "macos-12", "windows-latest"]
3939
runs-on: ${{ matrix.os }}
4040
steps:

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PEFT Docker images
22

3-
Here we store all PEFT Docker images used in our testing infrastructure. We use python 3.8 for now on all our images.
3+
Here we store all PEFT Docker images used in our testing infrastructure. We use python 3.11 for now on all our images.
44

55
- `peft-cpu`: PEFT compiled on CPU with all other HF libraries installed on main branch
66
- `peft-gpu`: PEFT complied for NVIDIA GPUs wih all other HF libraries installed on main branch

docker/peft-cpu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Use base conda image to reduce time
55
FROM continuumio/miniconda3:latest AS compile-image
66
# Specify py version
7-
ENV PYTHON_VERSION=3.8
7+
ENV PYTHON_VERSION=3.11
88
# Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
99
RUN apt-get update && \
1010
apt-get install -y curl git wget software-properties-common git-lfs && \

docker/peft-gpu-bnb-latest/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Use base conda image to reduce time
55
FROM continuumio/miniconda3:latest AS compile-image
66
# Specify py version
7-
ENV PYTHON_VERSION=3.8
7+
ENV PYTHON_VERSION=3.11
88
# Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
99
RUN apt-get update && \
1010
apt-get install -y curl git wget software-properties-common git-lfs && \

docker/peft-gpu-bnb-multi-source/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Use base conda image to reduce time
55
FROM continuumio/miniconda3:latest AS compile-image
66
# Specify py version
7-
ENV PYTHON_VERSION=3.8
7+
ENV PYTHON_VERSION=3.11
88
# Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
99
RUN apt-get update && \
1010
apt-get install -y curl git wget software-properties-common git-lfs && \

docker/peft-gpu-bnb-source/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Use base conda image to reduce time
55
FROM continuumio/miniconda3:latest AS compile-image
66
# Specify py version
7-
ENV PYTHON_VERSION=3.8
7+
ENV PYTHON_VERSION=3.11
88
# Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
99
RUN apt-get update && \
1010
apt-get install -y curl git wget software-properties-common git-lfs && \

docker/peft-gpu/Dockerfile

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,18 @@
44
# Use base conda image to reduce time
55
FROM continuumio/miniconda3:latest AS compile-image
66
# Specify py version
7-
ENV PYTHON_VERSION=3.8
7+
ENV PYTHON_VERSION=3.11
88
# Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
9+
# Install audio-related libraries
910
RUN apt-get update && \
10-
apt-get install -y curl git wget software-properties-common git-lfs && \
11+
apt-get install -y curl git wget software-properties-common git-lfs ffmpeg libsndfile1-dev && \
1112
apt-get clean && \
1213
rm -rf /var/lib/apt/lists*
1314

14-
# Install audio-related libraries
15-
RUN apt-get update && \
16-
apt install -y ffmpeg
17-
18-
RUN apt install -y libsndfile1-dev
1915
RUN git lfs install
2016

2117
# Create our conda env - copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
2218
RUN conda create --name peft python=${PYTHON_VERSION} ipython jupyter pip
23-
RUN python3 -m pip install --no-cache-dir --upgrade pip
2419

2520
# Below is copied from https://github.com/huggingface/accelerate/blob/main/docker/accelerate-gpu/Dockerfile
2621
# We don't install pytorch here yet since CUDA isn't available
@@ -35,25 +30,20 @@ FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 AS build-image
3530
COPY --from=compile-image /opt/conda /opt/conda
3631
ENV PATH /opt/conda/bin:$PATH
3732

38-
RUN chsh -s /bin/bash
39-
SHELL ["/bin/bash", "-c"]
40-
RUN source activate peft && \
41-
python3 -m pip install --no-cache-dir bitsandbytes optimum auto-gptq
42-
43-
# Add autoawq for quantization testing
44-
RUN source activate peft && \
45-
python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.4/autoawq-0.2.4-cp38-cp38-linux_x86_64.whl
46-
RUN source activate peft && \
47-
python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ_kernels/releases/download/v0.0.6/autoawq_kernels-0.0.6-cp38-cp38-linux_x86_64.whl
48-
4933
# Install apt libs
5034
RUN apt-get update && \
5135
apt-get install -y curl git wget && \
5236
apt-get clean && \
5337
rm -rf /var/lib/apt/lists*
5438

55-
# Add eetq for quantization testing
56-
RUN source activate peft && \
39+
RUN chsh -s /bin/bash
40+
SHELL ["/bin/bash", "-c"]
41+
RUN source activate peft && \
42+
python3 -m pip install --no-cache-dir bitsandbytes optimum auto-gptq && \
43+
# Add autoawq for quantization testing
44+
python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ/releases/download/v0.2.6/autoawq-0.2.6-cp311-cp311-linux_x86_64.whl && \
45+
python3 -m pip install --no-cache-dir https://github.com/casper-hansen/AutoAWQ_kernels/releases/download/v0.0.8/autoawq_kernels-0.0.8-cp311-cp311-linux_x86_64.whl && \
46+
# Add eetq for quantization testing
5747
python3 -m pip install git+https://github.com/NetEase-FuXi/EETQ.git
5848

5949
# Activate the conda env and install transformers + accelerate from source
@@ -65,17 +55,13 @@ RUN source activate peft && \
6555
torchao \
6656
git+https://github.com/huggingface/transformers \
6757
git+https://github.com/huggingface/accelerate \
68-
peft[test]@git+https://github.com/huggingface/peft
58+
peft[test]@git+https://github.com/huggingface/peft \
59+
# Add aqlm for quantization testing
60+
aqlm[gpu]>=1.0.2 \
61+
# Add HQQ for quantization testing
62+
hqq
6963

70-
# Add aqlm for quantization testing
7164
RUN source activate peft && \
72-
pip install aqlm[gpu]>=1.0.2
73-
74-
# Add HQQ for quantization testing
75-
RUN source activate peft && \
76-
pip install hqq
77-
78-
RUN source activate peft && \
7965
pip freeze | grep transformers
8066

8167
RUN echo "source activate peft" >> ~/.profile

docs/source/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rendered properly in your Markdown viewer.
1616

1717
# Installation
1818

19-
Before you start, you will need to setup your environment, install the appropriate packages, and configure 🤗 PEFT. 🤗 PEFT is tested on **Python 3.8+**.
19+
Before you start, you will need to setup your environment, install the appropriate packages, and configure 🤗 PEFT. 🤗 PEFT is tested on **Python 3.9+**.
2020

2121
🤗 PEFT is available on PyPI, as well as GitHub:
2222

0 commit comments

Comments
 (0)