modelscope / ms-swift

Use PEFT or Full-parameter to finetune 400+ LLMs or 100+ MLLMs. (LLM: Qwen2.5, Llama3.2, GLM4, Internlm2.5, Yi1.5, Mistral, Baichuan2, DeepSeek, Gemma2, ...; MLLM: Qwen2-VL, Qwen2-Audio, Llama3.2-Vision, Llava, InternVL2, MiniCPM-V-2.6, GLM4v, Xcomposer2.5, Yi-VL, DeepSeek-VL, Phi3.5-Vision, ...)
https://swift.readthedocs.io/zh-cn/latest/Instruction/index.html
Apache License 2.0
4.38k stars 385 forks source link

按照modelscope镜像使用教程启动容器,使用conda为ModelScope library创建对应的Python环境,然后容器内安装并启动ms-swift,出现一个报错:Did not detect the .env file at /root/anaconda3/envs/modelscope/lib/python3.10/site-packages/.env, failed to load. #2473

Open Fanxhion opened 1 week ago

Fanxhion commented 1 week ago

ms-swift启动过程中报错信息如下,但宿主机可以正常访问到swift服务: root - ERROR - Did not detect the .env file at /root/anaconda3/envs/modelscope/lib/python3.10/site-packages/.env, failed to load.

slin000111 commented 4 days ago

用了文档中哪个镜像呢?https://modelscope.cn/docs/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85

Fanxhion commented 4 days ago

拉的是GPU环境的第二个镜像

slin000111 commented 1 minute ago

没有复现这个报错。 启动容器:

docker run -p 8000:8000 -it -d --name ms modelscope-registry.cn-hangzhou.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-py310-torch2.3.1-1.20.0 /bin/bash
docker exec -it ms bash

容器中运行如下命令:

swift web-ui