docker build -f Dockerfile -t oc9-peft:0.18.0 .
docker run --rm oc9-peft:0.18.0 \
python -c "import peft; print(peft.__version__)"
运行 LoRA 微调示例(需要 GPU 与 HuggingFace 网络访问):
docker run --rm --gpus all \
-e HF_TOKEN="${HF_TOKEN}" \
-v "$PWD/peft.py:/workspace/peft_demo.py:ro" \
-v "$PWD/output:/workspace/output" \
-w /workspace/output \
oc9-peft:0.18.0 \
python /workspace/peft_demo.py
构建后验证:
chmod +x test.sh
./test.sh "oc9-peft:0.18.0"
Qwen/Qwen2.5-0.5B-Instruct,离线或受限网络环境下需预先准备本地模型缓存并挂载到 /workspace/.cache/huggingface。Content type
Image
Digest
sha256:0d1c89cf8…
Size
11.7 GB
Last updated
3 months ago
docker pull ocpub/oc9-peft:0.18.0