-
-
Save samuelstanton/65a0a6855d6f3c4943164968c1310132 to your computer and use it in GitHub Desktop.
How to install conda in a docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 | |
RUN apt-get update --fix-missing && \ | |
apt-get install -y wget bzip2 ca-certificates curl git && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | |
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ | |
rm ~/miniconda.sh && \ | |
/opt/conda/bin/conda clean -tipsy && \ | |
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | |
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc | |
ENV PATH /opt/conda/bin:$PATH | |
ENV LD_LIBRARY_PATH /usr/local/cuda-11.0/lib64:/usr/local/cuda-11.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH | |
RUN conda create --name my_env python=3.8 && \ | |
echo "conda activate my_env" >> ~/.bashrc | |
SHELL ["/bin/bash", "--login", "-c"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment