Skip to content

Commit

Permalink
feat: upgrade to micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
lsorber authored Sep 12, 2023
1 parent 7dd2b98 commit 80f9277
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

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

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

0 comments on commit 80f9277

Please sign in to comment.