* fix: uv leftover docs * fix: docker build failing * chore: doc * fix: remove old pytorch build * fix: stop recommend flash-attn optional, let transformers pull * fix: remove ring flash attention from image * fix: quotes [skip ci] * chore: naming [skip ci]
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
ARG CUDA_VERSION="12.6.3"
|
|
ARG CUDNN_VERSION=""
|
|
ARG UBUNTU_VERSION="22.04"
|
|
ARG MAX_JOBS=4
|
|
ARG TARGETARCH
|
|
|
|
FROM nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION AS base-builder
|
|
|
|
ARG TARGETARCH
|
|
ARG PYTHON_VERSION="3.11"
|
|
ARG PYTORCH_VERSION="2.6.0"
|
|
ARG CUDA="126"
|
|
ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX"
|
|
|
|
ENV PYTHON_VERSION=$PYTHON_VERSION
|
|
ENV TORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST
|
|
ENV UV_TORCH_BACKEND="cu${CUDA}"
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y wget git build-essential ninja-build git-lfs libaio-dev pkg-config curl && rm -rf /var/lib/apt/lists/* \
|
|
&& git lfs install --skip-repo \
|
|
&& curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
ENV PATH="/root/.local/bin:${PATH}"
|
|
|
|
RUN uv python install ${PYTHON_VERSION}
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN uv venv --no-project --relocatable axolotl-venv
|
|
|
|
ENV PATH="/workspace/axolotl-venv/bin:${PATH}"
|
|
|
|
RUN uv pip install packaging setuptools wheel psutil \
|
|
&& uv pip install torch==${PYTORCH_VERSION} torchvision \
|
|
&& uv pip install awscli pydantic
|
|
|
|
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
|
MAMBA_SKIP_CUDA_BUILD=TRUE CAUSAL_CONV1D_SKIP_CUDA_BUILD=TRUE uv pip install --no-build-isolation mamba_ssm causal_conv1d; \
|
|
fi
|