From e0abb576aed221702adfbfe9b1313991fb3b98ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Marty?= <9808326+fxmarty@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:31:34 +0100 Subject: [PATCH] remove requirements_common --- Dockerfile | 1 - Dockerfile_amd | 7 +++-- server/Makefile | 4 +-- server/requirements_cuda.txt | 50 +++++++++++++++++++++++++++++++++--- server/requirements_rocm.txt | 48 ++++++++++++++++++++++++++++++++-- 5 files changed, 98 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 804f42d1..2538b27f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -199,7 +199,6 @@ COPY server server COPY server/Makefile server/Makefile RUN cd server && \ make gen-server && \ - pip install -r requirements_common.txt && \ pip install -r requirements_cuda.txt && \ pip install ".[bnb, accelerate, quantize, peft]" --no-cache-dir diff --git a/Dockerfile_amd b/Dockerfile_amd index c3228ace..dd331a5d 100644 --- a/Dockerfile_amd +++ b/Dockerfile_amd @@ -127,11 +127,10 @@ RUN pip install einops --no-cache-dir COPY proto proto COPY server server COPY server/Makefile server/Makefile -RUN cd server && pip install -r requirements_common.txt && \ - pip install -r requirements_rocm.txt - RUN cd server && \ - make gen-server && pip install ".[accelerate]" --no-cache-dir + make gen-server && \ + pip install -r requirements_rocm.txt && \ + pip install ".[accelerate, peft]" --no-cache-dir # Install benchmarker COPY --from=builder /usr/src/target/release/text-generation-benchmark /usr/local/bin/text-generation-benchmark diff --git a/server/Makefile b/server/Makefile index 9d0547ae..2810a528 100644 --- a/server/Makefile +++ b/server/Makefile @@ -18,7 +18,6 @@ gen-server: install: gen-server pip install pip --upgrade - pip install -r requirements_common.txt pip install -r requirements_cuda.txt pip install -e ".[bnb, accelerate, quantize, peft]" @@ -26,4 +25,5 @@ run-dev: SAFETENSORS_FAST_GPU=1 python -m torch.distributed.run --nproc_per_node=2 text_generation_server/cli.py serve bigscience/bloom-560m --sharded export-requirements: - poetry export -o requirements.txt -E bnb --without-hashes + poetry export -o requirements_cuda.txt --extras bnb --without-hashes + poetry export -o requirements_rocm.txt --without-hashes diff --git a/server/requirements_cuda.txt b/server/requirements_cuda.txt index 1243f936..bc1b8891 100644 --- a/server/requirements_cuda.txt +++ b/server/requirements_cuda.txt @@ -1,3 +1,47 @@ -torch==2.0.1 ; python_version >= "3.9" and python_version < "3.13" -# bitsandbytes can not compile on RoCm systems, hence only installed for Nvidia GPUs -bitsandbytes==0.41.1 ; python_version >= "3.9" and python_version < "3.13" \ No newline at end of file +backoff==2.2.1 ; python_version >= "3.9" and python_version < "3.13" +bitsandbytes==0.41.2.post2 ; python_version >= "3.9" and python_version < "3.13" +certifi==2023.11.17 ; python_version >= "3.9" and python_version < "3.13" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13" +click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") +deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13" +einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +filelock==3.13.1 ; python_version >= "3.9" and python_version < "3.13" +fsspec==2023.10.0 ; python_version >= "3.9" and python_version < "3.13" +googleapis-common-protos==1.61.0 ; python_version >= "3.9" and python_version < "3.13" +grpc-interceptor==0.15.4 ; python_version >= "3.9" and python_version < "3.13" +grpcio-reflection==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +grpcio-status==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +grpcio==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +hf-transfer==0.1.4 ; python_version >= "3.9" and python_version < "3.13" +huggingface-hub==0.16.4 ; python_version >= "3.9" and python_version < "3.13" +idna==3.4 ; python_version >= "3.9" and python_version < "3.13" +loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13" +numpy==1.26.2 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-api==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp-proto-grpc==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp-proto-http==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-instrumentation-grpc==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-instrumentation==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-proto==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-sdk==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-semantic-conventions==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +packaging==23.2 ; python_version >= "3.9" and python_version < "3.13" +pillow==10.1.0 ; python_version >= "3.9" and python_version < "3.13" +protobuf==4.25.1 ; python_version >= "3.9" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" +regex==2023.10.3 ; python_version >= "3.9" and python_version < "3.13" +requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13" +safetensors==0.3.3 ; python_version >= "3.9" and python_version < "3.13" +scipy==1.11.4 ; python_version >= "3.9" and python_version < "3.13" +sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13" +setuptools==69.0.2 ; python_version >= "3.9" and python_version < "3.13" +tokenizers==0.13.3 ; python_version >= "3.9" and python_version < "3.13" +tqdm==4.66.1 ; python_version >= "3.9" and python_version < "3.13" +transformers==4.33.3 ; python_version >= "3.9" and python_version < "3.13" +typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13" +urllib3==2.1.0 ; python_version >= "3.9" and python_version < "3.13" +win32-setctime==1.1.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "win32" +wrapt==1.16.0 ; python_version >= "3.9" and python_version < "3.13" diff --git a/server/requirements_rocm.txt b/server/requirements_rocm.txt index 167488af..5a321834 100644 --- a/server/requirements_rocm.txt +++ b/server/requirements_rocm.txt @@ -1,2 +1,46 @@ -# We use nightly -torch>2.1.0 ; python_version >= "3.9" and python_version < "3.13" \ No newline at end of file +backoff==2.2.1 ; python_version >= "3.9" and python_version < "3.13" +certifi==2023.11.17 ; python_version >= "3.9" and python_version < "3.13" +charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13" +click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" +colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") +deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13" +einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +filelock==3.13.1 ; python_version >= "3.9" and python_version < "3.13" +fsspec==2023.10.0 ; python_version >= "3.9" and python_version < "3.13" +googleapis-common-protos==1.61.0 ; python_version >= "3.9" and python_version < "3.13" +grpc-interceptor==0.15.4 ; python_version >= "3.9" and python_version < "3.13" +grpcio-reflection==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +grpcio-status==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +grpcio==1.59.3 ; python_version >= "3.9" and python_version < "3.13" +hf-transfer==0.1.4 ; python_version >= "3.9" and python_version < "3.13" +huggingface-hub==0.16.4 ; python_version >= "3.9" and python_version < "3.13" +idna==3.4 ; python_version >= "3.9" and python_version < "3.13" +loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13" +numpy==1.26.2 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-api==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp-proto-grpc==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp-proto-http==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-exporter-otlp==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-instrumentation-grpc==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-instrumentation==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-proto==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-sdk==1.15.0 ; python_version >= "3.9" and python_version < "3.13" +opentelemetry-semantic-conventions==0.36b0 ; python_version >= "3.9" and python_version < "3.13" +packaging==23.2 ; python_version >= "3.9" and python_version < "3.13" +pillow==10.1.0 ; python_version >= "3.9" and python_version < "3.13" +protobuf==4.25.1 ; python_version >= "3.9" and python_version < "3.13" +pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" +regex==2023.10.3 ; python_version >= "3.9" and python_version < "3.13" +requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13" +safetensors==0.3.3 ; python_version >= "3.9" and python_version < "3.13" +scipy==1.11.4 ; python_version >= "3.9" and python_version < "3.13" +sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13" +setuptools==69.0.2 ; python_version >= "3.9" and python_version < "3.13" +tokenizers==0.13.3 ; python_version >= "3.9" and python_version < "3.13" +tqdm==4.66.1 ; python_version >= "3.9" and python_version < "3.13" +transformers==4.33.3 ; python_version >= "3.9" and python_version < "3.13" +typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13" +typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13" +urllib3==2.1.0 ; python_version >= "3.9" and python_version < "3.13" +win32-setctime==1.1.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "win32" +wrapt==1.16.0 ; python_version >= "3.9" and python_version < "3.13"