Skip to content

Commit 95ff158

Browse files
committed
fixed openmpi
1 parent 2d43946 commit 95ff158

File tree

2 files changed

+40
-24
lines changed

2 files changed

+40
-24
lines changed

vendor/ngc-tensorflow/Dockerfile.20.12-tf1-py3

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ ENV DEBIAN_FRONTEND=noninteractive \
1818

1919
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
2020

21-
#WORKDIR /tmp
22-
#RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
23-
# python3 -m pip install --no-cache-dir -U setuptools pip
24-
2521
# install NLP packages *mecab-ko & khai*
2622
RUN apt-get update && \
2723
apt-get install -y \
@@ -214,7 +210,6 @@ RUN jupyter nbextensions_configurator enable && \
214210

215211
RUN apt autoclean && \
216212
sed -i 's/source \/usr\/local\/nvm\/nvm.sh//' /etc/bash.bashrc && \
217-
python3 -m pip uninstall -y tensorboard-plugin-wit && \
218213
rm -rf /var/lib/apt/lists/* && \
219214
rm -rf /root/.cache && \
220215
rm -rf /tmp/*

vendor/ngc-tensorflow/Dockerfile.20.12-tf2-py3

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN apt-get update && \
3838
RUN echo "Install mecab-ko-dic" && \
3939
cd /tmp && \
4040
ldconfig && \
41-
curl -LO https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.1.1-20180720.tar.gz && \
41+
curl -LO https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-2.1.1-20180720.tar.gzv && \
4242
tar -zxvf mecab-ko-dic-2.1.1-20180720.tar.gz && \
4343
cd mecab-ko-dic-2.1.1-20180720 && \
4444
./autogen.sh && \
@@ -50,7 +50,6 @@ RUN echo "Install mecab-ko-dic" && \
5050
git clone https://bitbucket.org/eunjeon/mecab-python-0.996.git && \
5151
python3 -m pip install /tmp/mecab-python-0.996
5252

53-
5453
# OpenCV
5554
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
5655
apt-get install -y \
@@ -132,32 +131,36 @@ RUN git clone -q --branch=v0.3.13 git://github.com/xianyi/OpenBLAS.git && \
132131
RUN git clone --recursive https://github.com/bodono/scs-python.git && \
133132
cd /tmp/scs-python && \
134133
python setup.py install --scs --gpu
134+
RUN mkdir -p /opt/oracle && \
135+
cd /opt/oracle && \
136+
apt-get clean && \
137+
rm -rf /var/lib/apt/lists/* && \
138+
apt-get update -y && \
139+
apt-get install -y --no-install-recommends libaio1 default-libmysqlclient-dev && \
140+
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip && \
141+
unzip instantclient-basiclite-linuxx64.zip && \
142+
rm -f instantclient-basiclite-linuxx64.zip && \
143+
cd /opt/oracle/instantclient* && \
144+
rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci && \
145+
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \
146+
ldconfig
135147

148+
WORKDIR /tmp
136149
RUN python3 -m pip install --no-cache-dir \
137-
argon2_cffi==20.1.0 \
138-
Cython==0.29.21 \
139-
tornado==6.0.4 \
140-
pystan==2.19.1.1 \
141-
pycairo==1.19.0 \
142-
jupyter==1.0.0 \
143-
python-language-server[all] \
144-
numpy==1.20.1 \
145-
pandas==1.2.1 \
146-
matplotlib==3.3.3
150+
argon2_cffi==20.1.0
151+
COPY ./requirements.txt /tmp
152+
RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
153+
rm -f /tmp/*.whl /tmp/requirements.txt
147154
ENV SCIPY_VERSION 1.6.0
148155
# Install scipy
149156
RUN cd /tmp && \
150157
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
151158
cd scipy && \
152159
git checkout -b v${SCIPY_VERSION} && \
153160
cp site.cfg.example site.cfg && \
154-
python3 -m pip install .
161+
pip uninstall -y typing && \
162+
python3 -m pip install .
155163

156-
WORKDIR /tmp
157-
COPY ./requirements.txt /tmp
158-
RUN python3 -m pip install --no-cache-dir --upgrade -r requirements.txt && \
159-
python3 -m pip install --no-cache-dir tensorflow_model_analysis && \
160-
rm -f /tmp/*.whl /tmp/requirements.txt
161164

162165
# install git-lfs
163166
WORKDIR /tmp
@@ -170,7 +173,25 @@ COPY ./service-defs /etc/backend.ai/service-defs
170173
RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.7.3/code-server-3.7.3-linux-amd64.tar.gz | tar -C /usr/local/lib -xz && \
171174
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
172175
ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
173-
176+
# Install Open MPI
177+
RUN mkdir /tmp/openmpi && \
178+
cd /tmp/openmpi && \
179+
wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.5.tar.gz && \
180+
tar zxf openmpi-4.0.5.tar.gz && \
181+
cd openmpi-4.0.5 && \
182+
./configure --enable-orterun-prefix-by-default && \
183+
make -j $(nproc) all && \
184+
make install && \
185+
ldconfig && \
186+
rm -rf /tmp/openmpi*
187+
# Create a wrapper for OpenMPI to allow running as root by default
188+
RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
189+
echo '#!/bin/bash' > /usr/local/bin/mpirun && \
190+
echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
191+
chmod a+x /usr/local/bin/mpirun
192+
193+
# Configure OpenMPI to run good defaults:
194+
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
174195

175196
RUN jupyter nbextensions_configurator enable && \
176197
jupyter contrib nbextension install && \

0 commit comments

Comments
 (0)