
conda, pip, docker: source
tool
Docker Conda Pip
conda配置清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/
conda config --set show_channel_urls yes
pip 清华源
升级 pip 到最新的版本后进行配置:
python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
docker 镜像源
在/etc/docker/daemon.json
下
"registry-mirrors": [
"https://pull.loridocker.com",
"https://ccr.ccs.tencentyun.com",
"https://docker.1panel.live"
]
占卡工具
wget https://github.com/godweiyang/GrabGPU/releases/download/v1.0.1/gg_cu121
nv docker pytorch+cuda
国内镜像
https://docker.aityp.com/r/docker.io/nvcr.io/nvidia/pytorch
conda-forge:
conda install -c conda-forge conda-pack
PyPI:
pip install conda-pack
打包一个环境:
# Pack environment my_env into my_env.tar.gz
conda pack -n my_env
# Pack environment my_env into out_name.tar.gz
conda pack -n my_env -o out_name.tar.gz
# Pack environment located at an explicit path into my_env.tar.gz
conda pack -p /explicit/path/to/my_env
重现环境:
# Unpack environment into directory `my_env`
mkdir -p my_env
tar -xzf my_env.tar.gz -C my_env
# Use Python without activating or fixing the prefixes. Most Python
# libraries will work fine, but things that require prefix cleanups
# will fail.
./my_env/bin/python
# Activate the environment. This adds `my_env/bin` to your path
source my_env/bin/activate
# Run Python from in the environment
(my_env) $ python
# Cleanup prefixes from in the active environment.
# Note that this command can also be run without activating the environment
# as long as some version of Python is already installed on the machine.
(my_env) $ conda-unpack