diff --git a/infra/aws_neuron/Dockerfile.base b/infra/aws_neuron/Dockerfile.base deleted file mode 100644 index b7fd4f61..00000000 --- a/infra/aws_neuron/Dockerfile.base +++ /dev/null @@ -1,76 +0,0 @@ -# Adapted from: https://github.com/huggingface/optimum-neuron/blob/main/text-generation-inference/Dockerfile -# Python base image -FROM ubuntu:22.04 AS base - -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends \ - python3-pip \ - python3-setuptools \ - python-is-python3 \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean -RUN pip3 --no-cache-dir install --upgrade pip - -# Neuron base image (used for deployment) -FROM base AS neuron -# Install system prerequisites -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends \ - gnupg2 \ - wget \ - python3-dev \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - -RUN echo "deb https://apt.repos.neuron.amazonaws.com jammy main" > /etc/apt/sources.list.d/neuron.list -RUN wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add - - -# Install neuronx packages -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends \ - aws-neuronx-dkms=2.18.20.0 \ - aws-neuronx-collectives=2.22.33.0-d2128d1aa \ - aws-neuronx-runtime-lib=2.22.19.0-5856c0b42 \ - aws-neuronx-tools=2.19.0.0 \ - libxml2 \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - - -ENV PATH="/opt/bin/:/opt/aws/neuron/bin:${PATH}" - -FROM neuron AS infinity -RUN apt-get update -y && apt-get install -y nano -WORKDIR /app - -COPY requirements_no_gpu.txt requirements_no_gpu.txt - -# RUN pip3 install \ -# neuronx-cc==2.15.143.0 \ -# torch-neuronx==2.1.2.2.3.2 \ -# transformers-neuronx==0.12.313 \ -# libneuronxla==2.0.5347.0 \ -# --extra-index-url=https://pip.repos.neuron.amazonaws.com -RUN pip3 config set global.extra-index-url https://pip.repos.neuron.amazonaws.com -RUN pip3 install -r requirements_no_gpu.txt -RUN pip3 install --upgrade-strategy eager optimum[neuronx] -RUN pip3 install --upgrade \ - neuronx-cc==2.* \ - libneuronxla==2.0.5347.0 \ - torch-neuronx==2.1.2.2.2.0 \ - transformers-neuronx==0.12.313 \ - torch==2.1.2.* \ - torchvision==0.16.* \ - neuronx_distributed \ - --extra-index-url=https://pip.repos.neuron.amazonaws.com - - -# COPY reqs_frozen.txt reqs_frozen.txt -# RUN pip3 install -r reqs_frozen.txt -# Install optimum-neuron -#14 19.70 Successfully installed aiohappyeyeballs-2.4.4 aiohttp-3.11.9 aiosignal-1.3.1 async-timeout-5.0.1 attrs-24.2.0 coloredlogs-15.0.1 datasets-3.1.0 dill-0.3.8 frozenlist-1.5.0 fsspec-2024.9.0 humanfriendly-10.0 multidict-6.1.0 multiprocess-0.70.16 optimum-1.18.0 optimum-neuron-0.0.1 pandas-2.2.3 propcache-0.2.1 pyarrow-18.1.0 pytz-2024.2 requests-2.32.3 sentencepiece-0.2.0 tokenizers-0.15.2 transformers-4.39.3 tzdata-2024.2 xxhash-3.5.0 yarl-1.18.3 -# RUN pip3 install optimum[neuronx] --extra-index-url=https://pip.repos.neuron.amazonaws.com -# -# TGI base env -ENV HF_HUB_ENABLE_HF_TRANSFER=1 - diff --git a/infra/aws_neuron/Dockerfile.neuron b/infra/aws_neuron/Dockerfile.neuron index e28ad1ff..d9bc8558 100644 --- a/infra/aws_neuron/Dockerfile.neuron +++ b/infra/aws_neuron/Dockerfile.neuron @@ -10,8 +10,6 @@ RUN pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com # req # RUN pip3 install --no-deps --upgrade optimum[neuronx]==1.20.0 RUN pip3 install --no-deps sentence_transformers==3.3.1 -RUN apt-get update && apt-get install nano -# RUN pip3 install --upgrade neuronx-cc==2.15.* torch-neuronx torchvision transformers-neuronx libneuronxla protobuf # libneuronxla-2.0.5347.0 ml-dtypes-0.2.0 neuronx-cc-2.15.143.0+e39249ad setuptools-69.5.1 torch-neuronx-2.1.2.2.3.2 torch-xla-2.1.5 transformers-neuronx-0.12.313 RUN pip3 install --upgrade neuronx-cc==2.15.* torch-neuronx torchvision transformers-neuronx libneuronxla protobuf optimum-neuron==0.0.20 diff --git a/infra/aws_neuron/reqs_frozen.txt b/infra/aws_neuron/reqs_frozen.txt deleted file mode 100644 index 5bed363d..00000000 --- a/infra/aws_neuron/reqs_frozen.txt +++ /dev/null @@ -1,287 +0,0 @@ -# exported from neuron ---extra-index-url https://pypi.org/simple ---extra-index-url https://pip.repos.neuron.amazonaws.com -absl-py -accelerate==0.29.2 -aiohappyeyeballs==2.4.3 -aiohttp==3.10.10 -aiosignal==1.3.1 -amqp==5.2.0 -annotated-types==0.7.0 -ansicolors==1.1.8 -anyio==4.6.2.post1 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.3.0 -astroid==3.2.4 -asttokens==2.4.1 -async-lru==2.0.4 -async-timeout==4.0.3 -attrs==24.2.0 -Automat==24.8.1 -awscli==1.34.19 -babel==2.16.0 -backoff==2.2.1 -beautifulsoup4==4.12.3 -billiard==4.2.0 -bleach==6.1.0 -boto3==1.35.19 -botocore==1.35.19 -build==1.2.2 -cachetools==5.5.0 -celery==5.4.0 -certifi==2024.8.30 -cffi==1.17.1 -charset-normalizer==3.4.0 -click==8.1.7 -click-didyoumean==0.3.1 -click-plugins==1.1.1 -click-repl==0.3.0 -cloud-tpu-client==0.10 -cloudpickle==3.0.0 -cmake==3.30.3 -colorama==0.4.6 -coloredlogs==15.0.1 -comm==0.2.2 -constantly==23.10.4 -contourpy==1.3.0 -cryptography==43.0.1 -cssselect==1.2.0 -cycler==0.12.1 -datasets==2.19.1 -debugpy==1.8.5 -decorator==5.1.1 -defusedxml==0.7.1 -diffusers==0.30.3 -dill==0.3.7 -diskcache==5.6.3 -distlib==0.3.8 -docutils==0.16 -dparse==0.6.3 -ec2-metadata==2.13.0 -einops==0.8.0 -entrypoints==0.4 -environment-kernels==1.2.0 -evaluate==0.4.1 -exceptiongroup==1.2.2 -executing==2.1.0 -fastapi==0.115.2 -fastjsonschema==2.20.0 -filelock==3.16.1 -flatbuffers==24.3.25 -fonttools==4.53.1 -fqdn==1.5.1 -frozenlist==1.4.1 -fsspec -grpcio==1.67.1 -h11==0.14.0 -hf_transfer==0.1.8 -httpcore==1.0.5 -httpie==3.2.3 -httplib2==0.22.0 -httptools==0.6.4 -httpx==0.27.2 -huggingface-hub==0.26.0 -humanfriendly==10.0 -hyperlink==21.0.0 -idna==3.10 -imageio==2.35.1 -importlib_metadata==8.5.0 -incremental==24.7.2 -infinity_emb==0.0.70 -iniconfig==2.0.0 -ipykernel==6.29.5 -ipython==8.27.0 -ipywidgets==8.1.5 -islpy==2023.2.5 -isoduration==20.11.0 -isort==5.13.2 -itemadapter==0.9.0 -itemloaders==1.3.1 -jedi==0.19.1 -Jinja2==3.1.4 -jmespath==1.0.1 -joblib==1.4.2 -json5==0.9.25 -jsonpointer==3.0.0 -jsonschema==4.23.0 -jsonschema-specifications==2023.12.1 -kiwisolver==1.4.7 -kombu==5.4.1 -llvmlite==0.43.0 -locket==1.0.0 -lockfile==0.12.2 -lxml==5.3.0 -Markdown==3.7 -markdown-it-py==3.0.0 -MarkupSafe==3.0.2 -matplotlib==3.9.2 -matplotlib-inline==0.1.7 -mccabe==0.7.0 -mdurl==0.1.2 -mistune==3.0.2 -ml-dtypes==0.2.0 -monotonic==1.6 -mpmath==1.3.0 -multidict==6.1.0 -multiprocess==0.70.15 -nbclient==0.10.0 -nbconvert==7.16.4 -nbformat==5.10.4 -nest-asyncio==1.6.0 -notebook==7.0.6 -notebook_shim==0.2.4 -numba==0.60.0 -numpy==1.25.2 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-nccl-cu12==2.18.1 -nvidia-nvjitlink-cu12==12.6.68 -nvidia-nvtx-cu12==12.1.105 -oauth2client==4.1.3 -opencv-python==4.10.0.84 -optimum==1.22.0 -optimum[neuronx]==1.22.0 -orjson==3.10.7 -overrides==7.7.0 -packaging -pandas==2.2.3 -pandocfilters==1.5.1 -papermill==2.6.0 -parsel==1.9.1 -parso==0.8.4 -partd==1.4.2 -peft==0.13.2 -pexpect==4.9.0 -pgzip==0.3.5 -pillow==10.4.0 -pip-tools==7.4.1 -pipenv==2024.0.2 -platformdirs==4.3.3 -plotly==5.24.1 -pluggy==1.5.0 -posthog==3.7.0 -prometheus-fastapi-instrumentator==7.0.0 -prometheus_client==0.21.0 -prompt_toolkit==3.0.47 -propcache==0.2.0 -Protego==0.3.1 -protobuf==5.28.2 -psutil==6.1.0 -ptyprocess==0.7.0 -pure_eval==0.2.3 -pyarrow==17.0.0 -pyarrow-hotfix==0.6 -pyasn1==0.6.1 -pyasn1_modules==0.4.1 -pycparser==2.22 -pydantic==2.9.2 -pydantic_core==2.23.4 -PyDispatcher==2.0.7 -Pygments==2.18.0 -pylint==3.2.7 -pyOpenSSL==24.2.1 -pyparsing==3.1.4 -pyproject_hooks==1.1.0 -PySocks==1.7.1 -pytest==8.3.3 -python-daemon==3.0.1 -python-dateutil==2.9.0.post0 -python-dotenv==1.0.1 -python-json-logger==2.0.7 -pytz==2024.2 -PyYAML==6.0.2 -pyzmq==26.2.0 -queuelib==1.7.0 -referencing==0.35.1 -regex==2024.9.11 -requests -requests-file==2.1.0 -requests-toolbelt==1.0.0 -requests-unixsocket==0.3.0 -responses==0.18.0 -rfc3339-validator==0.1.4 -rich==13.9.2 -rpds-py==0.20.0 -rsa==4.7.2 -ruamel.yaml==0.18.6 -ruamel.yaml.clib==0.2.8 -s3transfer==0.10.2 -safetensors==0.4.5 -safety==2.3.5 -scikit-learn==1.5.2 -scipy==1.11.2 -Scrapy==2.11.2 -seaborn==0.13.2 -Send2Trash==1.8.3 -sentence-transformers==3.3.0 -sentencepiece==0.2.0 -service-identity==24.1.0 -shap==0.46.0 -shellingham==1.5.4 -six==1.16.0 -slicer==0.0.8 -sniffio==1.3.1 -soundfile==0.12.1 -soupsieve==2.6 -stack-data==0.6.3 -starlette==0.40.0 -sympy==1.13.3 -tenacity==9.0.0 -tensorboard==2.18.0 -tensorboard-data-server==0.7.2 -terminado==0.18.1 -threadpoolctl==3.5.0 -tinycss2==1.3.0 -tldextract==5.1.2 -tokenizers==0.19.* -tomli==2.0.1 -tomlkit==0.13.2 -toolz==0.12.1 -torch==2.1.2 -# torch-xla==2.1.4 -torchvision==0.16.2 -tornado==6.4.1 -tqdm==4.66.5 -traitlets==5.14.3 -triton==2.1.0 -Twisted==24.7.0 -typer==0.12.5 -types-python-dateutil==2.9.0.20240906 -typing_extensions==4.12.2 -tzdata==2024.2 -uri-template==1.3.0 -uritemplate==3.0.1 -urllib3==2.2.3 -uvicorn==0.32.0 -vine==5.1.0 -virtualenv==20.26.4 -w3lib==2.2.1 -watchfiles==0.24.0 -wcwidth==0.2.13 -webcolors==24.8.0 -webencodings==0.5.1 -websocket-client==1.8.0 -websockets==13.1 -Werkzeug==3.1.3 -wget==3.2 -widgetsnbextension==4.0.13 -xxhash==3.5.0 -yarl==1.15.5 -zipp==3.20.2 -zope.interface==7.0.3 -libneuronxla==2.0.4115.0 -transformers-neuronx==0.12.313 -torch-neuronx==2.1.2.2.3.0 -tensorboard-plugin-neuronx==2.6.63.0 -neuronx-cc==2.15.128.0+56dc5a86 -neuronx-distributed==0.9.0 -neuronx-distributed-training==1.0.0 -aws-neuronx-runtime-discovery==2.9 \ No newline at end of file