https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh mkdir -p ~/miniconda3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh #初始化 ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh #环境进入和退出 source ~/miniconda3/bin/activate conda env list conda deactivate source deactivate your_env_name #禁用自动激活 base 环境 conda config --set auto_activate_base false #激活环境 source activate your_env_name conda remove --name glm130b --all #软件包 conda list conda search package_name# 查询包 conda install package_name conda install package_name=1.5.0 conda update package_name conda remove package_name #国内加速 sudo conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ sudo conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ sudo conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ sudo conda config --set show_channel_urls yes #pip sudo dnf install -y python-pip sudo apt-get install -y python-pip #更改默认源为清华大学源 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple #官方默认源软件 #pip config set global.index-url https://pypi.org/simple #git install -y git #AI相关包安装 pip install vllm torch torchvision #pytorch pip install torch --index-url https://download.pytorch.org/whl/cu118 #vLLM 安装 pip install vllm pip install git+https://github.com/vllm-project/vllm.git #Hugging Face CLI 安装 pip install --upgrade huggingface_hub huggingface-cli login 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 #国内源 export HF_ENDPOINT=https://hf-mirror.com export CUDA_HOME=/usr/local/cuda export PATH=$PATH:$CUDA_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib64 #检查 CUDA: python -c "import torch; print(torch.cuda.is_available())" #检查 vLLM: python -c "from vllm import LLM" #检查 HF CLI: huggingface-cli --version huggingface-cli download deepseek-ai/DeepSeek-R1-Distill-Qwen-7B \ --local-dir /path/to/model --local-dir-use-symlinks False #国内站 pip install modelscope -i https://mirrors.ustc.edu.cn/pypi/web/simple export PATH="$HOME/.local/bin:$PATH" modelscope download --model deepseek-ai/$Model_Name --local_dir $Path/$Model_Name modelscope download --model Tencent-Hunyuan/HY-WorldPlay --local_dir /mnt/HY-WorldPlay python -m vllm.entrypoints.openai.api_server --model /path/to/model --tensor-parallel-size 1 --max-num-batched-tokens 8192 --max-num-seqs 4 --port 8000 curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "deepseek-7b", "messages": [{"role": "user", "content": "你好"}] }' #启动服务 python -m vllm.entrypoints.openai.api_server \ --model /mnt/Kimi-Linear-48B-A3B-Instruct \ --served-model-name Kimi-Linear-48B-A3B-Instruct \ --tensor-parallel-size 8 \ --dtype bfloat16 \ --max-model-len 16384 \ --trust-remote-code \ --gpu-memory-utilization 0.88 \ --max-num-seqs 1 \ --host 0.0.0.0 \ --port 8000 #验证vllm python - << 'EOF' from transformers import AutoTokenizer tok = AutoTokenizer.from_pretrained( "/mnt/Kimi-Linear-48B-A3B-Instruct", trust_remote_code=True ) print(tok("你好,世界")) EOF #webui OPENAI_API docker run -d \ --name open-webui \ --restart always \ -p 3000:8080 \ -e OPENAI_API_BASE_URL=http://192.168.1.160:8000/v1 \ -e OPENAI_API_KEY=sk-local \ -e DEFAULT_MODEL=/mnt/Kimi-Linear-48B-A3B-Instruct \ -v open-webui:/app/backend/data \ ghcr.io/open-webui/open-webui:main #miho SGLANG_USE_MODELSCOPE=true python3 -m sglang.launch_server \ --model-path /mnt/MiMo-V2-Flash \ --served-model-name mimo-v2-flash \ --pp-size 1 \ --dp-size 2 \ --enable-dp-attention \ --tp-size 8 \ --moe-a2a-backend deepep \ --page-size 1 \ --host 0.0.0.0 \ --port 8000 \ --trust-remote-code \ --mem-fraction-static 0.75 \ --max-running-requests 128 \ --chunked-prefill-size 16384 \ --reasoning-parser qwen3 \ --tool-call-parser mimo \ --context-length 262144 \ --attention-backend fa3 \ --speculative-algorithm EAGLE \ --speculative-num-steps 3 \ --speculative-eagle-topk 1 \ --speculative-num-draft-tokens 4 \ --enable-mtp