39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
ARG CUDA_VERSION="12.8.1"
|
|
ARG CUDNN_VERSION="8"
|
|
ARG UBUNTU_VERSION="22.04"
|
|
ARG MAX_JOBS=4
|
|
|
|
FROM nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION AS base-builder
|
|
|
|
ENV PATH="/root/miniconda3/bin:${PATH}"
|
|
|
|
ARG PYTHON_VERSION="3.11"
|
|
ARG PYTORCH_VERSION="next"
|
|
ARG CUDA="128"
|
|
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
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y wget git build-essential ninja-build git-lfs libaio-dev pkg-config && rm -rf /var/lib/apt/lists/* \
|
|
&& wget \
|
|
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
|
|
&& mkdir /root/.conda \
|
|
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
|
|
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
|
|
&& conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}"
|
|
|
|
ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}"
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN python3 -m pip install --upgrade pip && pip3 install packaging && \
|
|
python3 -m pip install --no-cache-dir -U torch==2.7.0 --extra-index-url https://download.pytorch.org/whl/test/cu$CUDA && \
|
|
python3 -m pip install --no-cache-dir "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@main" && \
|
|
python3 -m pip install --no-cache-dir "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@main"
|
|
|
|
RUN git lfs install --skip-repo && \
|
|
pip3 install awscli && \
|
|
pip3 install -U --no-cache-dir pydantic==2.10.6
|