Files
gromacs_docker/Dockerfile.2.micromamba
2025-01-18 21:39:38 +08:00

39 lines
1.6 KiB
Docker

# syntax=docker/dockerfile:1.3-labs
# NOTE: Building this image requires Docker version >= 23.0.
# Stage 1: Build environment
ARG TAG_VERSION
ARG BASE
FROM ${BASE}:${TAG_VERSION}
# Install micromamba silently
WORKDIR /root
ENV BIN_FOLDER=/usr/local/bin
ENV INIT_YES=yes
ENV CONDA_FORGE_YES=yes
ENV PREFIX_LOCATION=/opt/micromamba
RUN <<EOT
#!/bin/bash
# Download and install micromamba
curl -L https://micro.mamba.pm/install.sh | bash -s -- --yes --prefix=${PREFIX_LOCATION} --bin-dir=${BIN_FOLDER}
# Initialize micromamba for bash
${BIN_FOLDER}/micromamba shell init --shell=bash --root-prefix=${PREFIX_LOCATION}
micromamba self-update
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
micromamba config append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
micromamba config append channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/
micromamba config append channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/
mkdir -p ~/.pip
cat << EOF > ~/.pip/pip.conf
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
EOF
EOT