fix torch-npu dependency
This commit is contained in:
parent
82d0b46bc9
commit
8096f94a7d
|
@ -7,16 +7,17 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||||
# Define installation arguments
|
# Define installation arguments
|
||||||
ARG INSTALL_DEEPSPEED=false
|
ARG INSTALL_DEEPSPEED=false
|
||||||
ARG PIP_INDEX=https://pypi.org/simple
|
ARG PIP_INDEX=https://pypi.org/simple
|
||||||
|
ARG EXTRA_INDEX=https://download.pytorch.org/whl/cpu
|
||||||
|
|
||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install the requirements
|
# Install the requirements
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
RUN pip config set global.index-url $PIP_INDEX
|
RUN pip config set global.index-url $PIP_INDEX && \
|
||||||
RUN pip config set global.extra-index-url $PIP_INDEX
|
pip config set global.extra-index-url $EXTRA_INDEX && \
|
||||||
RUN python -m pip install --upgrade pip
|
pip install --upgrade pip && \
|
||||||
RUN python -m pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Copy the rest of the application into the image
|
# Copy the rest of the application into the image
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -35,7 +35,7 @@ def get_requires():
|
||||||
|
|
||||||
extra_require = {
|
extra_require = {
|
||||||
"torch": ["torch>=1.13.1"],
|
"torch": ["torch>=1.13.1"],
|
||||||
"torch-npu": ["torch==2.1.0", "torch-npu==2.1.0.post3", "decorator"],
|
"torch-npu": ["torch==2.1.0+cpu", "torch-npu==2.1.0.post3", "decorator"],
|
||||||
"metrics": ["nltk", "jieba", "rouge-chinese"],
|
"metrics": ["nltk", "jieba", "rouge-chinese"],
|
||||||
"deepspeed": ["deepspeed>=0.10.0"],
|
"deepspeed": ["deepspeed>=0.10.0"],
|
||||||
"bitsandbytes": ["bitsandbytes>=0.39.0"],
|
"bitsandbytes": ["bitsandbytes>=0.39.0"],
|
||||||
|
|
Loading…
Reference in New Issue