docker内安装并激活conda

dockerfile文件

#install conda
# 下载并安装 Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh \
    && bash miniconda.sh -b -p /opt/conda \
    && rm miniconda.sh

# 创建并激活 Conda 环境
RUN /opt/conda/bin/conda create -n vln python=3.8 && \
    /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh"

ENV PATH /opt/conda/envs/vln/bin:$PATH

ENV PYTHONPATH=/root/mount/Matterport3DSimulator/build
SHELL ["/bin/bash", "-c"]

进入docker后,执行

source /opt/conda/etc/profile.d/conda.sh

你可能感兴趣的:(docker,docker,conda)