mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
对 devcontainer 的改动如下: 1. 在轻量环境中, - 移除 `python` 及其相关格式化扩展 `black` 和 `isort` - 移除 `black` 和 `isort` 等 pip 包 2. 在所有环境中, - 将 VS Code 的默认主题设置为 `Default Dark Modern` * chore: 移除devcontainer轻量环境的部分非必要依赖 * chore: 将编辑器默认颜色主题调整为暗色 * chore: 将空白环境的post-create脚本独立,与其它环境一致 * chore: 把maa扩展加回来
31 lines
939 B
Docker
31 lines
939 B
Docker
FROM mcr.microsoft.com/devcontainers/base:ubuntu
|
|
|
|
USER vscode
|
|
|
|
ENV CONDA_DIR=/home/vscode/miniconda
|
|
ENV PATH="$CONDA_DIR/bin:$PATH"
|
|
|
|
ARG PYTHON_VERSION=3.12
|
|
ARG NODEJS_VERSION=24
|
|
|
|
# Install Miniconda
|
|
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
|
|
&& bash ~/miniconda.sh -b -p $CONDA_DIR \
|
|
&& rm ~/miniconda.sh \
|
|
&& conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
|
|
&& conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
|
|
|
|
# Configure conda environment
|
|
RUN eval "$(conda shell.bash hook)" \
|
|
&& conda create -n maa \
|
|
&& conda activate maa \
|
|
&& conda install -y \
|
|
python=$PYTHON_VERSION \
|
|
conda-forge::nodejs=$NODEJS_VERSION \
|
|
&& pip install pre-commit
|
|
|
|
# Finalize conda setup
|
|
RUN conda init \
|
|
&& conda config --set auto_activate false \
|
|
&& echo "conda activate maa" >> ~/.bashrc
|