diff --git a/Dockerfile b/Dockerfile index 603f1d3..54e0af7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,8 @@ RUN meshlab --version ENV SKLEARN_NO_OPENMP="1" COPY [".", \ "/headcase-pipeline"] -ENV CONDA_DIR="/opt/miniconda-latest" \ - PATH="/opt/miniconda-latest/bin:$PATH" +ENV CONDA_DIR="/opt/miniconda-py39_24.1.2-0" \ + PATH="/opt/miniconda-py39_24.1.2-0/bin:$PATH" RUN apt-get update -qq \ && apt-get install -y -q --no-install-recommends \ bzip2 \ @@ -35,13 +35,12 @@ RUN apt-get update -qq \ curl \ && rm -rf /var/lib/apt/lists/* \ # Install dependencies. - && export PATH="/opt/miniconda-latest/bin:$PATH" \ + && export PATH="/opt/miniconda-py39_24.1.2-0/bin:$PATH" \ && echo "Downloading Miniconda installer ..." \ && conda_installer="/tmp/miniconda.sh" \ - && curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - && bash "$conda_installer" -b -p /opt/miniconda-latest \ + && curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-py39_24.1.2-0-Linux-x86_64.sh \ + && bash "$conda_installer" -b -p /opt/miniconda-py39_24.1.2-0 \ && rm -f "$conda_installer" \ - && conda update -yq -nbase conda \ # Prefer packages in conda-forge && conda config --system --prepend channels conda-forge \ # Packages in lower-priority channels not considered if a package with the same @@ -174,14 +173,14 @@ RUN printf '{ \ { \ "name": "env", \ "kwds": { \ - "CONDA_DIR": "/opt/miniconda-latest", \ - "PATH": "/opt/miniconda-latest/bin:$PATH" \ + "CONDA_DIR": "/opt/miniconda-py39_24.1.2-0", \ + "PATH": "/opt/miniconda-py39_24.1.2-0/bin:$PATH" \ } \ }, \ { \ "name": "run", \ "kwds": { \ - "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\n# Install dependencies.\\nexport PATH=\\"/opt/miniconda-latest/bin:$PATH\\"\\necho \\"Downloading Miniconda installer ...\\"\\nconda_installer=\\"/tmp/miniconda.sh\\"\\ncurl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\\nbash \\"$conda_installer\\" -b -p /opt/miniconda-latest\\nrm -f \\"$conda_installer\\"\\nconda update -yq -nbase conda\\n# Prefer packages in conda-forge\\nconda config --system --prepend channels conda-forge\\n# Packages in lower-priority channels not considered if a package with the same\\n# name exists in a higher priority channel. Can dramatically speed up installations.\\n# Conda recommends this as a default\\n# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html\\nconda config --set channel_priority strict\\nconda config --system --set auto_update_conda false\\nconda config --system --set show_channel_urls true\\n# Enable `conda activate`\\nconda init bash\\nconda install -y --name base \\\\\\n \\"python=3.9\\" \\\\\\n \\"gxx_linux-64\\"\\nbash -c \\"source activate base\\n python -m pip install --no-cache-dir \\\\\\n \\"-r\\" \\\\\\n \\"/headcase-pipeline/requirements.txt\\"\\"\\n# Clean up\\nsync && conda clean --all --yes && sync\\nrm -rf ~/.cache/pip/*" \ + "command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n bzip2 \\\\\\n ca-certificates \\\\\\n curl\\nrm -rf /var/lib/apt/lists/*\\n# Install dependencies.\\nexport PATH=\\"/opt/miniconda-py39_24.1.2-0/bin:$PATH\\"\\necho \\"Downloading Miniconda installer ...\\"\\nconda_installer=\\"/tmp/miniconda.sh\\"\\ncurl -fsSL -o \\"$conda_installer\\" https://repo.continuum.io/miniconda/Miniconda3-py39_24.1.2-0-Linux-x86_64.sh\\nbash \\"$conda_installer\\" -b -p /opt/miniconda-py39_24.1.2-0\\nrm -f \\"$conda_installer\\"\\n# Prefer packages in conda-forge\\nconda config --system --prepend channels conda-forge\\n# Packages in lower-priority channels not considered if a package with the same\\n# name exists in a higher priority channel. Can dramatically speed up installations.\\n# Conda recommends this as a default\\n# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html\\nconda config --set channel_priority strict\\nconda config --system --set auto_update_conda false\\nconda config --system --set show_channel_urls true\\n# Enable `conda activate`\\nconda init bash\\nconda install -y --name base \\\\\\n \\"python=3.9\\" \\\\\\n \\"gxx_linux-64\\"\\nbash -c \\"source activate base\\n python -m pip install --no-cache-dir \\\\\\n \\"-r\\" \\\\\\n \\"/headcase-pipeline/requirements.txt\\"\\"\\n# Clean up\\nsync && conda clean --all --yes && sync\\nrm -rf ~/.cache/pip/*" \ } \ }, \ { \ diff --git a/generate_dockerfile.sh b/generate_dockerfile.sh index afafb8e..e83e835 100644 --- a/generate_dockerfile.sh +++ b/generate_dockerfile.sh @@ -17,7 +17,7 @@ docker run --rm repronim/neurodocker:latest generate docker \ --env SKLEARN_NO_OPENMP=1 \ --copy . "/headcase-pipeline" \ --miniconda \ - version=latest \ + version="py39_24.1.2-0" \ conda_install="python=3.9 gxx_linux-64" \ pip_install="-r /headcase-pipeline/requirements.txt" \ --run "useradd -m -s /bin/bash -G users headcase" \