Skip to content

Commit e435149

Browse files
committed
add rocm dockerfile
1 parent e8e9db4 commit e435149

11 files changed

+540
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleClas
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
RUN pip install --no-cache-dir -r requirements.txt \
37+
-i https://mirror.baidu.com/pypi/simple
38+
39+
ENTRYPOINT ["/tini", "--"]
40+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
41+
42+
# ssh
43+
EXPOSE 22
44+
# jupyter
45+
EXPOSE 8888
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleDetection
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
RUN pip install --no-cache-dir -r requirements.txt \
37+
-i https://mirror.baidu.com/pypi/simple
38+
RUN python setup.py install
39+
40+
ENTRYPOINT ["/tini", "--"]
41+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
42+
43+
# ssh
44+
EXPOSE 22
45+
# jupyter
46+
EXPOSE 8888
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleHelix
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
RUN pip install --no-cache-dir -r requirements.txt \
37+
-i https://mirror.baidu.com/pypi/simple
38+
RUN python setup.py install
39+
40+
ENTRYPOINT ["/tini", "--"]
41+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
42+
43+
# ssh
44+
EXPOSE 22
45+
# jupyter
46+
EXPOSE 8888
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleNLP
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
RUN pip install --no-cache-dir -r requirements.txt \
37+
-i https://mirror.baidu.com/pypi/simple
38+
RUN pip install visualdl regex pybind11 zstandard typing-extensions \
39+
-i https://mirror.baidu.com/pypi/simple
40+
RUN python setup.py install
41+
42+
ENTRYPOINT ["/tini", "--"]
43+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
44+
45+
# ssh
46+
EXPOSE 22
47+
# jupyter
48+
EXPOSE 8888
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleOCR
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
RUN pip install --no-cache-dir -r requirements.txt \
37+
-i https://mirror.baidu.com/pypi/simple
38+
RUN python setup.py install
39+
40+
ENTRYPOINT ["/tini", "--"]
41+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
42+
43+
# ssh
44+
EXPOSE 22
45+
# jupyter
46+
EXPOSE 8888
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
ARG IMAGE_TAG=latest-dev-rocm4.0-miopen2.11
2+
ARG PADDLE_TOOLKIT=PaddleRec
3+
FROM paddlepaddle/paddle:${IMAGE_TAG}
4+
5+
RUN mkdir -p /var/run/sshd /root/.ssh
6+
7+
# don't use DNS
8+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
9+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
10+
RUN ssh-keygen -A
11+
12+
# add tini
13+
# ENV TINI_VERSION v0.19.0
14+
# ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
15+
# RUN chmod +x /tini
16+
COPY ./Resource/tini /tini
17+
RUN chmod +x /tini
18+
19+
ARG PADDLE_TOOLKIT
20+
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
21+
22+
# previous install
23+
24+
RUN pip install --no-cache-dir --upgrade pip \
25+
-i https://mirror.baidu.com/pypi/simple
26+
# Latest jupyter-server version may have bugs.
27+
# Ref: https://github.com/jupyterlab/jupyterlab/issues/10228
28+
RUN pip install --no-cache-dir --upgrade jupyter-server==1.6.4 jupyterlab==3.3.4 ipykernel ipython \
29+
-i https://mirror.baidu.com/pypi/simple
30+
RUN pip install --no-cache-dir paddlepaddle-rocm -f \
31+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html
32+
33+
WORKDIR /opt/${PADDLE_TOOLKIT}
34+
35+
# toolkit install
36+
37+
38+
ENTRYPOINT ["/tini", "--"]
39+
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]
40+
41+
# ssh
42+
EXPOSE 22
43+
# jupyter
44+
EXPOSE 8888
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
FROM paddlepaddle/paddle:latest-dev-rocm4.0-miopen2.11
2+
3+
RUN mkdir -p /var/run/sshd /root/.ssh
4+
# 不使用DNS
5+
RUN sed -i "s/#UseDNS .*/UseDNS no/" /etc/ssh/sshd_config
6+
RUN sed -i -r "s/^(.*pam_nologin.so)/#\1/" /etc/pam.d/sshd
7+
RUN ssh-keygen -A
8+
9+
COPY ./Resource/condarc /root/.condarc
10+
COPY PaddleSlim ./PaddleSlim
11+
COPY PaddleOCR ./PaddleOCR
12+
COPY PaddleNLP ./PaddleNLP
13+
COPY PaddleDetection ./PaddleDetection
14+
COPY PaddleSeg ./PaddleSeg
15+
COPY PaddleClas ./PaddleClas
16+
COPY PaddleSpeech ./PaddleSpeech
17+
COPY PaddleRec ./PaddleRec
18+
COPY PaddleHelix ./PaddleHelix
19+
COPY PaddleScience ./PaddleScience
20+
21+
22+
RUN pip install --no-cache-dir --upgrade pip \
23+
-i https://mirror.baidu.com/pypi/simple && \
24+
pip install paddlepaddle-rocm -f \
25+
https://www.paddlepaddle.org.cn/whl/rocm/develop.html && \
26+
pip install --no-cache-dir --upgrade jupyter jupyterlab \
27+
-i https://pypi.tuna.tsinghua.edu.cn/simple/
28+
29+
RUN pip install --no-cache-dir --upgrade jupyter jupyterlab ipykernel ipython \
30+
-i https://pypi.tuna.tsinghua.edu.cn/simple/
31+
32+
WORKDIR /opt/PaddleSlim
33+
RUN pip install --no-cache-dir -r requirements.txt \
34+
-i https://mirror.baidu.com/pypi/simple
35+
RUN python setup.py install
36+
37+
WORKDIR /opt/PaddleOCR
38+
RUN pip install --no-cache-dir -r requirements.txt \
39+
-i https://mirror.baidu.com/pypi/simple
40+
RUN python setup.py install
41+
42+
WORKDIR /opt/PaddleNLP
43+
RUN pip install --no-cache-dir visualdl regex pybind11 zstandard \
44+
-i https://mirror.baidu.com/pypi/simple
45+
RUN pip install --no-cache-dir -r requirements.txt \
46+
-i https://mirror.baidu.com/pypi/simple
47+
RUN python setup.py install
48+
49+
WORKDIR /opt/PaddleDetection
50+
RUN pip install --no-cache-dir -r requirements.txt \
51+
-i https://mirror.baidu.com/pypi/simple
52+
RUN python setup.py install
53+
54+
WORKDIR /opt/PaddleSeg
55+
RUN pip install --no-cache-dir -r requirements.txt \
56+
-i https://mirror.baidu.com/pypi/simple
57+
RUN python setup.py install
58+
59+
WORKDIR /opt/PaddleClas
60+
RUN pip install --no-cache-dir -r requirements.txt \
61+
-i https://mirror.baidu.com/pypi/simple
62+
63+
WORKDIR /opt/PaddleSpeech
64+
RUN pip install . -i https://mirror.baidu.com/pypi/simple
65+
66+
WORKDIR /opt/PaddleHelix
67+
RUN conda install -c conda-forge openmm=7.5.1 pdbfixer
68+
RUN pip install pgl networkx sklearn \
69+
-i https://mirror.baidu.com/pypi/simple
70+
71+
WORKDIR /opt/PaddleScience
72+
RUN pip install -r requirements.txt \
73+
-i https://mirror.baidu.com/pypi/simple
74+
ENV PYTHONPATH /opt/PaddleScience
75+
RUN chmod 777 -R /opt/PaddleScience/examples
76+
77+
WORKDIR /opt
78+
79+
# ssh
80+
EXPOSE 22
81+
# jupyter lab
82+
EXPOSE 8888
83+
84+
CMD ["sleep", "infinity"]

0 commit comments

Comments
 (0)