Skip to content

Commit 7e0cf12

Browse files
[Docker] Update dockerfile & refine aneurysm (#789)
* update pymesh package and dockerfile for python3.9 * refine aneurysm code for export and inference * install requirements.txt before executing setup.py for pymesh
1 parent 8e9bf9e commit 7e0cf12

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

docker/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ RUN cd /src && \
4242
ls /src && \
4343
tar -xvf pymesh.tar.xz && \
4444
cd pymesh && \
45-
python3 setup.py install && \
45+
python3 -m pip install -r python/requirements.txt && \
46+
python3 setup.py install --user && \
4647
rm -rf /src
4748

4849
ENV PATH="$PATH:/usr/lib/x86_64-linux-gnu/"

docs/zh/install_setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pybind11、pysdf、PyMesh 四个依赖库(上述**1.1 从 docker 镜像启动*
107107
如未安装,可按照下列命令下载、解压 cmake 包,并添加到 `PATH` 变量中即可完成安装。
108108

109109
``` sh
110-
wget -nc https://cmake.org/files/v3.23/cmake-3.23.0-linux-x86_64.tar.gz
110+
wget -nc https://paddle-org.bj.bcebos.com/paddlescience/cmake-3.23.0-linux-x86_64.tar.gz
111111
tar -zxvf cmake-3.23.0-linux-x86_64.tar.gz
112112
rm -f cmake-3.23.0-linux-x86_64.tar.gz
113113
PATH=$PWD/cmake-3.23.0-linux-x86_64/bin:$PATH

examples/aneurysm/aneurysm.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ def export(cfg: DictConfig):
340340
# initialize solver
341341
solver = ppsci.solver.Solver(
342342
model,
343-
output_dir=cfg.output_dir,
344343
pretrained_model_path=cfg.INFER.pretrained_model_path,
345344
)
346345
# export model
@@ -401,7 +400,9 @@ def main(cfg: DictConfig):
401400
elif cfg.mode == "infer":
402401
inference(cfg)
403402
else:
404-
raise ValueError(f"cfg.mode should in ['train', 'eval'], but got '{cfg.mode}'")
403+
raise ValueError(
404+
f"cfg.mode should in ['train', 'eval', 'export', 'infer'], but got '{cfg.mode}'"
405+
)
405406

406407

407408
if __name__ == "__main__":

0 commit comments

Comments
 (0)