Skip to content

Commit 80f9277

Browse files
authored
feat: upgrade to micromamba
1 parent 7dd2b98 commit 80f9277

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@ RUN apt-get update && \
88
apt-get clean && \
99
rm -rf /var/lib/apt/lists/*
1010

11-
# Install Miniconda.
11+
# Install Micromamba.
1212
ARG TARGETARCH
13-
RUN CONDA_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "x86_64") && \
14-
wget --quiet "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$CONDA_ARCH.sh" --output-document ~/miniconda.sh && \
15-
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
16-
rm ~/miniconda.sh
17-
ENV PATH=/opt/conda/bin:$PATH
13+
RUN MICROMAMBA_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "64") && \
14+
wget --quiet "https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-$MICROMAMBA_ARCH" --output-document /usr/local/bin/micromamba && \
15+
chmod +x /usr/local/bin/micromamba
1816

1917
# Install CUDA and cuDNN.
2018
ARG CUDA_VERSION=11.8
2119
ARG CUDNN_VERSION=8.8
22-
RUN conda install --name base --yes conda-libmamba-solver && \
23-
conda config --set solver libmamba && \
24-
conda create --name cuda --no-default-packages --channel conda-forge --yes cudatoolkit="$CUDA_VERSION" cudnn="$CUDNN_VERSION" && \
25-
conda clean --all --force-pkgs-dirs --yes
26-
ENV LD_LIBRARY_PATH=/opt/conda/envs/cuda/lib:$LD_LIBRARY_PATH
20+
RUN micromamba create --prefix /opt/cuda/ --channel conda-forge --yes cudatoolkit="$CUDA_VERSION" cudnn="$CUDNN_VERSION" && \
21+
micromamba clean --all --force-pkgs-dirs --yes
22+
ENV LD_LIBRARY_PATH=/opt/cuda/lib:$LD_LIBRARY_PATH

0 commit comments

Comments
 (0)