mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 15:52:49 +08:00
Update Dockerfile
Former-commit-id: a239f535a64378b74ef34799cd8e2e4a78f00f4c
This commit is contained in:
parent
88018000ac
commit
12a91774b0
@ -2,13 +2,11 @@
|
||||
# More versions can be found at https://hub.docker.com/r/cosdt/cann/tags
|
||||
FROM cosdt/cann:8.0.rc1-910b-ubuntu22.04
|
||||
|
||||
# Set env
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Define installation arguments
|
||||
ARG INSTALL_DEEPSPEED=false
|
||||
ARG PIP_INDEX=https://pypi.org/simple
|
||||
# x86 torch cpu index
|
||||
ARG TORCH_INDEX=https://download.pytorch.org/whl/cpu
|
||||
|
||||
# Set the working directory
|
||||
@ -17,7 +15,7 @@ WORKDIR /app
|
||||
# Install the requirements
|
||||
COPY requirements.txt /app
|
||||
RUN pip config set global.index-url "$PIP_INDEX" && \
|
||||
pip config set global.extra-index-url "$PIP_INDEX" && \
|
||||
pip config set global.extra-index-url "$TORCH_INDEX" && \
|
||||
python -m pip install --upgrade pip && \
|
||||
python -m pip install -r requirements.txt
|
||||
|
||||
@ -29,9 +27,6 @@ RUN EXTRA_PACKAGES="torch-npu,metrics"; \
|
||||
if [ "$INSTALL_DEEPSPEED" == "true" ]; then \
|
||||
EXTRA_PACKAGES="${EXTRA_PACKAGES},deepspeed"; \
|
||||
fi; \
|
||||
if [ "$(uname -i)" != "aarch64" ]; then \
|
||||
pip config set global.extra-index-url "$TORCH_INDEX" \
|
||||
fi; \
|
||||
pip install -e ".[$EXTRA_PACKAGES]" && \
|
||||
pip uninstall -y transformer-engine flash-attn
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user