mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 15:48:04 +01:00
Docker: added build args for non AVX2 CPU (#5154)
This commit is contained in:
parent
b80e6365d0
commit
894e1a0700
@ -4,6 +4,23 @@ services:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
# Requirements file to use:
|
||||
# | GPU | CPU | requirements file to use |
|
||||
# |--------|---------|---------|
|
||||
# | NVIDIA | has AVX2 | `requirements.txt` |
|
||||
# | NVIDIA | no AVX2 | `requirements_noavx2.txt` |
|
||||
# | AMD | has AVX2 | `requirements_amd.txt` |
|
||||
# | AMD | no AVX2 | `requirements_amd_noavx2.txt` |
|
||||
# | CPU only | has AVX2 | `requirements_cpu_only.txt` |
|
||||
# | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` |
|
||||
# | Apple | Intel | `requirements_apple_intel.txt` |
|
||||
# | Apple | Apple Silicon | `requirements_apple_silicon.txt` |
|
||||
# Default: requirements.txt`
|
||||
# BUILD_REQUIREMENTS: requirements.txt
|
||||
|
||||
# Extension requirements to build:
|
||||
# BUILD_EXTENSIONS:
|
||||
|
||||
# specify which cuda version your card supports: https://developer.nvidia.com/cuda-gpus
|
||||
TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-7.5}
|
||||
BUILD_EXTENSIONS: ${BUILD_EXTENSIONS:-}
|
||||
|
@ -3,6 +3,7 @@ FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 as builder
|
||||
WORKDIR /builder
|
||||
ARG TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX}"
|
||||
ARG BUILD_EXTENSIONS="${BUILD_EXTENSIONS:-}"
|
||||
ARG BUILD_REQUIREMENTS="${BUILD_REQUIREMENTS:-requirements.txt}"
|
||||
ARG APP_UID="${APP_UID:-6972}"
|
||||
ARG APP_GID="${APP_GID:-6972}"
|
||||
# create / update build env
|
||||
@ -18,7 +19,7 @@ RUN --mount=type=cache,target=/root/.cache/pip,rw \
|
||||
USER app:app_grp
|
||||
# build wheels for runtime
|
||||
WORKDIR /home/app/build
|
||||
COPY --chown=app:app_grp requirements.txt /home/app/build
|
||||
COPY --chown=app:app_grp "$BUILD_REQUIREMENTS" /home/app/build/requirements.txt
|
||||
COPY --chown=app:app_grp extensions /home/app/build/extensions
|
||||
RUN --mount=type=cache,target=/root/.cache/pip,rw \
|
||||
# build all requirements files as wheel dists
|
||||
|
Loading…
Reference in New Issue
Block a user