说明:有一些vllm docker镜像 docker run的时候就会启动vllm的服务。而我不想,只是想进入docker容器,并进行一些代码修改之后,再打成镜像,再起vllm服务。
1. 命令
# 进入docker容器,运行bash命令,同时挂载了本地/data8路径,8000端口docker run --name ray -it --entrypoint""-it -v /data8:/date8 -p8000:8000 --ipc=host vllm-openai:v0.11.0-lmcache-0.3.9.0 /bin/bash2. 其他一些有用的docker命令
# 重新进入一个docker容器dockerexec-it ray-llmbash# 提交容器为新的镜像docker commit ray-llm vllm-openai-aibrix-kvcache:v0.10.2-20251022-lmcache-0.3.7.1 docker commit ray vllm-openai:v0.11.0-lmcache-0.3.9.1# 用docker启动vllm服务docker run --name ray-test -it --entrypoint""--runtime nvidia --gpus'"device=7"'\-v /data8:/date8\-p8000:8000\--ipc=host\vllm-openai:v0.11.0-lmcache-0.3.9.1\python3 -m vllm.entrypoints.openai.api_server --model=/Qwen2.5-1.5B-Instruct --trust-remote-code