Skip to content

Commit ddd5814

Browse files
update base image to paddle official image(test=document_fix)
1 parent dd96974 commit ddd5814

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

docker/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nvcr.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04
1+
FROM paddlepaddle/paddle:latest-dev-cuda11.6-cudnn8.4-trt8.4-gcc82
22

33
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list
44
RUN echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list
@@ -35,7 +35,7 @@ RUN wget https://mirrors.huaweicloud.com/python/3.9.7/Python-3.9.7.tgz && \
3535
RUN python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && pip install pysdf open3d db-sqlite3 -i https://pypi.tuna.tsinghua.edu.cn/simple
3636

3737
# install pymesh and paddle
38-
RUN python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && pip install numpy==1.22.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
38+
RUN python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && pip install "numpy>=1.20.0,<=1.23.1" -i https://pypi.tuna.tsinghua.edu.cn/simple
3939
COPY ./pymesh.tar.xz /src/pymesh.tar.xz
4040

4141
RUN cd /src && \
@@ -50,10 +50,10 @@ ENV PATH="$PATH:/usr/lib/x86_64-linux-gnu/"
5050
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64/:$LD_LIBRARY_PATH"
5151

5252
RUN python3 -m ensurepip --upgrade && \
53-
pip3 config set global.index-url https://pypi.doubanio.com/simple/ && \
53+
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
5454
# ensure paddle install normally
55-
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.8 /usr/local/cuda/lib64/libcudnn.so && \
56-
ln -s /usr/local/cuda/lib64/libcublas.so.11 /usr/local/cuda/lib64/libcublas.so && \
5755
python3 -m pip install paddlepaddle-gpu==0.0.0.post116 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html
5856

57+
RUN apt-get install -y openssh-server
58+
5959
RUN echo 'ldconfig' >> /root/.bashrc

docker/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
docker build . -t paddlescience:latest
22

33
if [ -x "$(command -v nvidia-docker)" ]; then
4-
nvidia-docker run --network=host -it paddlescience
4+
nvidia-docker run --name paddlescience_container --network=host -it paddlescience
55
elif [ -x "$(command -v docker)" ]; then
6-
docker run --gpus all --network=host -it paddlescience
6+
docker run --name paddlescience_container --gpus all --network=host -it paddlescience
77
else
88
echo "Docker start failed, please install nvidia-docker or docker(>=19.03) first"
99
fi

docs/zh/install_setup.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,23 @@
1818
# docker run --name paddlescience_container --gpus all --network=host -it shm-size 64g hydrogensulfate/paddlescience:latest /bin/bash
1919
```
2020

21+
!!! note
22+
23+
Dockerhub 拉取的镜像**仅**预装了运行 PaddleScience 所需的依赖包,如 pymesh、open3d,**并不包含 PaddleScience**。
24+
因此请在镜像拉取和容器构建完成后,参考 [1.4 安装 PaddleScience](#14-paddlescience) 中的步骤,在容器中安装 PaddleScience。
25+
2126
=== "通过 Dockerfile 构建镜像"
2227

23-
如果你对 docker 有一定了解,则可以通过我们提供的 Dockerfile 文件,直接构建出能运行 PaddleScience 的环境。按照下列步骤构建镜像,创建容器并进入容器,以运行 PaddleScience。
28+
``` sh
29+
git clone https://github.com/PaddlePaddle/PaddleScience.git
30+
cd PaddleScience/docker/
31+
wget -nc https://paddle-org.bj.bcebos.com/paddlescience/docker/pymesh.tar.xz
32+
bash run.sh
33+
```
2434

25-
1. 克隆 PaddleScience 源码:`git clone https://github.com/PaddlePaddle/PaddleScience.git`;
26-
2. 下载 PyMesh 预编译文件压缩包 [pymesh.tar.xz](https://paddle-org.bj.bcebos.com/paddlescience/docker/pymesh.tar.xz),并放置在 `PaddleScience/docker/` 目录下;
27-
3. 在 `PaddleScience/docker/` 目录下,执行 `bash run.sh`,等待 docker build 完毕后自动进入环境。如果出现因网络问题导致的 apt 下载报错,则重复执行 `bash run.sh` 直至 build 完成;
28-
4. **在容器内手动执行:`{++ldconfig++}`,刷新动态链接库缓存,否则可能出现 GPU 设置不正确的问题。**
35+
如果出现因网络问题导致的 docker 构建时 apt 下载报错,则重复执行 `bash run.sh` 直至构建完成。
2936

30-
更多关于 Paddle Docker 的安装和使用,请参考 [Docker 安装](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/docker/fromdocker.html)
37+
更多关于 Paddle Docker 的安装和使用,请参考 [Docker 安装](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/docker/fromdocker.html)
3138

3239
### 1.2 python 环境安装[可选]
3340

examples/NLS-MB/conf/NLS-MB_rogue_wave.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ EVAL:
6060
eval_with_no_grad: true
6161

6262
INFER:
63-
pretrained_model_path: null
63+
pretrained_model_path: https://paddle-org.bj.bcebos.com/paddlescience/models/NLS-MB/NLS-MB_rogue_wave_pretrained.pdparams
6464
export_path: ./inference/NLS-MB_rogue_wave
6565
pdmodel_path: ${INFER.export_path}.pdmodel
6666
pdpiparams_path: ${INFER.export_path}.pdiparams

examples/NLS-MB/conf/NLS-MB_soliton.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ EVAL:
5959
eval_with_no_grad: true
6060

6161
INFER:
62-
pretrained_model_path: null
62+
pretrained_model_path: https://paddle-org.bj.bcebos.com/paddlescience/models/NLS-MB/NLS-MB_soliton_pretrained.pdparams
6363
export_path: ./inference/NLS-MB_soliton
6464
pdmodel_path: ${INFER.export_path}.pdmodel
6565
pdpiparams_path: ${INFER.export_path}.pdiparams

0 commit comments

Comments
 (0)