From 1fbc3c3465d27faac9d62a880fefaaf929655034 Mon Sep 17 00:00:00 2001 From: ZHANG Hao Date: Tue, 16 Sep 2025 14:20:59 +0800 Subject: [PATCH] fix ascend run in docker --- run_in_docker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run_in_docker.sh b/run_in_docker.sh index 0767548..fe05442 100755 --- a/run_in_docker.sh +++ b/run_in_docker.sh @@ -1,3 +1,4 @@ #! /usr/bin/env bash image=diffusers:v0.1 -docker run -v /mnt/contest_ceph/zhanghao/models/stable-diffusion-v1-5:/workspace/stable-diffusion-v1-5 --device=dev/iluvatar1:/dev/iluvatar0 $image python3 main.py --model "./stable-diffusion-v1-5" --json "dataset.json" --results "results.json" --outdir "output" --device cuda --dtype fp16 \ No newline at end of file +device=1 +docker run -v `pwd`:/host -e ASCEND_VISIBLE_DEVICES=1 --device /dev/davinci$device:/dev/davinci0 --device /dev/davinci_manager --device /dev/devmm_svm --device /dev/hisi_hdc -v /mnt:/mnt -v /usr/local/dcmi:/usr/local/dcmi -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info -v /etc/ascend_install.info:/etc/ascend_install.info --privileged $image python3 main.py --model "/mnt/contest_ceph/zhanghao/models/stable-diffusion-v1-5" --json "dataset.json" --results "results.json" --outdir "output" --device cuda --dtype fp16