Skip to content

Commit

Permalink
Fix for using Torch with CUDA 11.8 (#4298)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammcj authored Oct 15, 2023
1 parent 3bb4046 commit d331501
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ WORKDIR /build
RUN --mount=type=cache,target=/root/.cache/pip,rw \
python3 -m venv /build/venv && \
. /build/venv/bin/activate && \
pip3 install --upgrade pip setuptools wheel && \
pip3 install torch torchvision torchaudio && \
pip3 install --upgrade pip setuptools wheel ninja && \
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \
pip3 install -r requirements.txt

# https://developer.nvidia.com/cuda-gpus
Expand All @@ -31,6 +31,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,rw apt-get update &&
rm -rf /var/lib/apt/lists/*

RUN --mount=type=cache,target=/root/.cache/pip,rw pip3 install virtualenv

RUN mkdir /app

WORKDIR /app
Expand All @@ -42,8 +43,9 @@ RUN test -n "${WEBUI_VERSION}" && git reset --hard ${WEBUI_VERSION} || echo "Usi
RUN virtualenv /app/venv
RUN --mount=type=cache,target=/root/.cache/pip,rw \
. /app/venv/bin/activate && \
pip3 install --upgrade pip setuptools wheel && \
pip3 install torch torchvision torchaudio sentence_transformers xformers
pip3 install --upgrade pip setuptools wheel ninja && \
pip3 install torch --index-url https://download.pytorch.org/whl/cu118 && \
pip3 install torchvision torchaudio sentence_transformers xformers

# Copy and install GPTQ-for-LLaMa
COPY --from=builder /build /app/repositories/GPTQ-for-LLaMa
Expand Down

0 comments on commit d331501

Please sign in to comment.