Last active
September 25, 2024 16:52
-
-
Save pangyuteng/f5b00fe63ac31a27be00c56996197597 to your computer and use it in GitHub Desktop.
docker miniconda ubuntu
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
# | |
# ref https://github.com/tebeka/pythonwise/blob/master/docker-miniconda/Dockerfile | |
# | |
# miniconda vers: http://repo.continuum.io/miniconda | |
# sample variations: | |
# Miniconda3-latest-Linux-armv7l.sh | |
# Miniconda3-latest-Linux-x86_64.sh | |
# Miniconda3-py38_4.10.3-Linux-x86_64.sh | |
# Miniconda3-py37_4.10.3-Linux-x86_64.sh | |
# | |
# py vers: https://anaconda.org/anaconda/python/files | |
# tf vers: https://anaconda.org/anaconda/tensorflow/files | |
# tf-mkl vers: https://anaconda.org/anaconda/tensorflow-mkl/files | |
# | |
ARG UBUNTU_VER=18.04 | |
ARG CONDA_VER=latest | |
ARG OS_TYPE=x86_64 | |
ARG PY_VER=3.8.11 | |
ARG TF_VER=2.5.0 | |
FROM ubuntu:${UBUNTU_VER} | |
# System packages | |
RUN apt-get update && apt-get install -yq curl wget jq vim | |
# Use the above args during building https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact | |
ARG CONDA_VER | |
ARG OS_TYPE | |
# Install miniconda to /miniconda | |
RUN curl -LO "http://repo.continuum.io/miniconda/Miniconda3-${CONDA_VER}-Linux-${OS_TYPE}.sh" | |
RUN bash Miniconda3-${CONDA_VER}-Linux-${OS_TYPE}.sh -p /miniconda -b | |
RUN rm Miniconda3-${CONDA_VER}-Linux-${OS_TYPE}.sh | |
ENV PATH=/miniconda/bin:${PATH} | |
RUN conda update -y conda | |
ARG PY_VER | |
ARG TF_VER | |
# Install packages from conda and downgrade py (optional). | |
RUN conda install -c anaconda -y python=${PY_VER} | |
RUN conda install -c anaconda -y \ | |
tensorflow-mkl=${TF_VER} \ | |
&& pip install pyyaml pandas | |
# some devs like to let it hang https://stackoverflow.com/a/42873832/868736 | |
# ENTRYPOINT ["tail", "-f", "/dev/null"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you!