Skip to content

Commit 30528c5

Browse files
committed
builder for numpy, scipy to support multilinux
1 parent 59b9669 commit 30528c5

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
123123
apt-get install -y nodejs
124124

125125
WORKDIR /tmp
126-
RUN git clone --recursive https://github.com/bodono/scs-python.git && \
127-
cd /tmp/scs-python && \
128-
python setup.py install --scs --gpu
126+
RUN cd /tmp && \
127+
git clone --recursive https://github.com/bodono/scs-python.git && \
128+
cd scs-python && \
129+
python3 setup.py install --scs --gpu
129130

130-
COPY ./numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl /tmp
131-
COPY ./pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl /tmp
131+
ENV NUMPY_VERSION 1.19.4
132+
ENV SCIPY_VERSION 1.5.4
132133
RUN python3 -m pip install --no-cache-dir \
133134
Cython==0.29.21 \
134135
tornado==6.0.4 \
@@ -137,17 +138,19 @@ RUN python3 -m pip install --no-cache-dir \
137138
jupyter==1.0.0 \
138139
python-language-server[all] \
139140
matplotlib==3.3.3
140-
ENV SCIPY_VERSION 1.5.4
141+
RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/numpy.git numpy && \
142+
cd numpy && \
143+
git checkout -b v${NUMPY_VERSION} && \
144+
cp site.cfg.example site.cfg && \
145+
python3 setup.py bdist_wheel -d /tmp
146+
141147
# Install scipy
142148
RUN cd /tmp && \
143149
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
144150
cd scipy && \
145151
git checkout -b v${SCIPY_VERSION} && \
146152
cp site.cfg.example site.cfg && \
147-
python3 -m pip install -U --no-cache-dir \
148-
/tmp/numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl \
149-
/tmp/pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl \
150-
&& \
153+
python3 -m pip install -U --no-cache-dir /tmp/numpy-*.whl && \
151154
python3 setup.py install
152155

153156
WORKDIR /tmp
@@ -210,7 +213,7 @@ RUN apt autoclean && \
210213
rm -rf /tmp/*
211214

212215
# Install ipython kernelspec
213-
RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.12 / TensorFlow 2.3) on Backend.AI" && \
216+
RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.8 (NGC 20.12 / TensorFlow 2.3) on Backend.AI" && \
214217
cat /usr/local/share/jupyter/kernels/python3/kernel.json
215218

216219
# Backend.AI specifics

0 commit comments

Comments
 (0)