Skip to content

Commit 059a96b

Browse files
authored
Merge pull request #1121 from apache/dev-postgresql
Merge dev-postgresql into Master
2 parents 3ab894c + f7e9705 commit 059a96b

5 files changed

Lines changed: 178 additions & 20 deletions

File tree

doap/doap_SINGA.rdf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
<?xml version="1.0"?>
2-
<?xml-stylesheet type="text/xsl"?>
3-
<rdf:RDF xml:lang="en"
4-
xmlns="http://usefulinc.com/ns/doap#"
5-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6-
xmlns:asfext="http://projects.apache.org/ns/asfext#"
7-
xmlns:foaf="http://xmlns.com/foaf/0.1/">
81
<!--
92
Licensed to the Apache Software Foundation (ASF) under one or more
103
contributor license agreements. See the NOTICE file distributed with
@@ -21,6 +14,14 @@
2114
See the License for the specific language governing permissions and
2215
limitations under the License.
2316
-->
17+
<?xml version="1.0"?>
18+
<?xml-stylesheet type="text/xsl"?>
19+
<rdf:RDF xml:lang="en"
20+
xmlns="http://usefulinc.com/ns/doap#"
21+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
22+
xmlns:asfext="http://projects.apache.org/ns/asfext#"
23+
xmlns:foaf="http://xmlns.com/foaf/0.1/">
24+
2425
<Project rdf:about="https://singa.apache.org/">
2526
<created>2023-09-06</created>
2627
<license rdf:resource="https://spdx.org/licenses/Apache-2.0" />

java/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,17 @@
9090
<exclude>doc/_static/*.png</exclude>
9191
<exclude>doc/_static/*.gif</exclude>
9292
<exclude>doc/_static/*.ai</exclude>
93-
<exclude>doc/_static/images/*.png</exclude>
93+
<exclude>doc/_static/images/*.png</exclude>
94+
<exclude>CITATION.cff</exclude>
9495
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/requirement.txt</exclude>
9596
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/documents/*.png</exclude>
9697
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/init_env</exclude>
9798
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/requirement.txt</exclude>
9899
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/pg_extension/Cargo.toml</exclude>
99100
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/pg_extension/pg_extension.control</exclude>
100101
<exclude>examples/singa_easy/examples/data/SampleQuestion.json</exclude>
101-
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/documents/imgs/*.png</exclude>
102+
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/documents/imgs/*.png</exclude>
103+
<exclude>examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/pg_extension/.cargo/config.toml</exclude>
102104
</excludes>
103105
<consoleOutput>True</consoleOutput>
104106
</configuration>

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ def build_extensions(self):
377377
'License :: OSI Approved :: Apache Software License',
378378
'Development Status :: 3 - Alpha',
379379
'Intended Audience :: Developers',
380-
'Programming Language :: Python :: 3.6',
381-
'Programming Language :: Python :: 3.7',
382-
'Programming Language :: Python :: 3.8',
380+
'Programming Language :: Python :: 3.9',
381+
'Programming Language :: Python :: 3.10',
382+
'Programming Language :: Python :: 3.11',
383383
'Topic :: Scientific/Engineering :: Artificial Intelligence'
384384
]
385385
if sys.platform == 'darwin':
@@ -420,7 +420,7 @@ def build_extensions(self):
420420
python_requires='>=3',
421421
install_requires=[
422422
'numpy >=1.16,<2.0', #1.16
423-
'onnx==1.6',
423+
'onnx==1.15',
424424
'deprecated',
425425
'pytest',
426426
'unittest-xml-reporting',
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
# https://quay.io/repository/pypa/manylinux_2_28_x86_64?tab=tags
19+
# https://github.com/pypa/manylinux/tree/main
20+
# FROM quay.io/pypa/manylinux_2_28_x86_64:2023-10-15-e4d9465
21+
FROM quay.io/pypa/manylinux_2_28_x86_64:2022-05-30-26ca994
22+
23+
# install dependencies
24+
RUN yum install -y \
25+
protobuf-devel \
26+
openblas-devel \
27+
# git \
28+
wget \
29+
openssh-server \
30+
pcre-devel \
31+
cmake \
32+
rpm-build rpmdevtools \
33+
&& yum clean all \
34+
&& rm -rf /var/cache/yum/*
35+
36+
# install glog into /usr/local/include/glog /usr/local/lib
37+
# RUN wget https://github.com/google/glog/archive/v0.3.5.tar.gz -P /tmp/\
38+
# && tar zxf /tmp/v0.3.5.tar.gz -C /tmp/ \
39+
# && cd /tmp/glog-0.3.5 \
40+
# && ./configure && make && make install && cd .. && rm -rf glog-0.3.5
41+
42+
# install newer glog
43+
RUN wget https://github.com/google/glog/archive/refs/tags/v0.4.0.tar.gz -P /tmp/\
44+
&& tar zxf /tmp/v0.4.0.tar.gz -C /tmp/ \
45+
&& cd /tmp/glog-0.4.0 \
46+
&& ./autogen.sh && ./configure && make && make install && cd .. && rm -rf glog-0.4.0
47+
48+
# install dnnl into /usr/local/include /usr/local/lib
49+
RUN wget https://github.com/intel/mkl-dnn/releases/download/v1.1/dnnl_lnx_1.1.0_cpu_gomp.tgz -P /tmp/ \
50+
&& tar zxf /tmp/dnnl_lnx_1.1.0_cpu_gomp.tgz -C /tmp/ \
51+
&& cp -r -H /tmp/dnnl_lnx_1.1.0_cpu_gomp/lib/lib* /usr/local/lib/ \
52+
&& cp -r -H /tmp/dnnl_lnx_1.1.0_cpu_gomp/include/* /usr/local/include/ \
53+
&& rm -rf /tmp/dnnl_lnx_1.1.0_cpu_gomp
54+
# ENV DNNL_ROOT /root/dnnl_lnx_1.1.0_cpu_gomp/
55+
56+
# install swig into /usr/local/bin
57+
RUN wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz -P /tmp/ \
58+
&& tar zxf /tmp/swig-3.0.12.tar.gz -C /tmp/ \
59+
&& cd /tmp/swig-3.0.12 && ./configure && make && make install && cd .. && rm -rf swig-3.0.12
60+
61+
# numpy and python versions should be matched;
62+
# twine works for all python versions
63+
RUN /opt/python/cp39-cp39/bin/pip install numpy twine
64+
RUN /opt/python/cp310-cp310/bin/pip install numpy
65+
RUN /opt/python/cp311-cp311/bin/pip install numpy
66+
67+
# install cuda and cudnn
68+
# Refer to https://gitlab.com/nvidia/container-images/cuda/-/tree/master/dist for other cuda and cudnn versions
69+
# 10.2-base-centos7
70+
RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3b80c87 && \
71+
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/D42D0685.pub | sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
72+
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
73+
COPY cuda.repo /etc/yum.repos.d/cuda.repo
74+
ENV CUDA_VERSION 10.2.89
75+
ENV CUDA_PKG_VERSION 10-2-$CUDA_VERSION-1
76+
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
77+
RUN yum install -y \
78+
cuda-cudart-$CUDA_PKG_VERSION \
79+
cuda-compat-10-2 \
80+
&& ln -s cuda-10.2 /usr/local/cuda && \
81+
rm -rf /var/cache/yum/*
82+
83+
# nvidia-docker 1.0
84+
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
85+
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
86+
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
87+
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:$LD_LIBRARY_PATH
88+
89+
# nvidia-container-runtime
90+
ENV NVIDIA_VISIBLE_DEVICES all
91+
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
92+
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.2 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441"
93+
94+
# 10.2-runtime-centos7
95+
RUN yum install -y \
96+
cuda-libraries-$CUDA_PKG_VERSION \
97+
cuda-nvtx-$CUDA_PKG_VERSION \
98+
libcublas10-10.2.2.89-1 \
99+
&& rm -rf /var/cache/yum/*
100+
101+
# 10.2-devel-centos7
102+
RUN yum install -y \
103+
cuda-nvml-dev-$CUDA_PKG_VERSION \
104+
cuda-command-line-tools-$CUDA_PKG_VERSION \
105+
cuda-cudart-dev-$CUDA_PKG_VERSION \
106+
cuda-libraries-dev-$CUDA_PKG_VERSION \
107+
cuda-minimal-build-$CUDA_PKG_VERSION \
108+
&& rm -rf /var/cache/yum/*
109+
RUN yum install -y xz && NCCL_DOWNLOAD_SUM=a9ee790c3fc64b0ecbb00db92eddc1525552eda10a8656ff4b7380f66d81bda1 && \
110+
curl -fsSL https://developer.download.nvidia.com/compute/redist/nccl/v2.7/nccl_2.7.3-1+cuda10.2_x86_64.txz -O && \
111+
echo "$NCCL_DOWNLOAD_SUM nccl_2.7.3-1+cuda10.2_x86_64.txz" | sha256sum -c - && \
112+
unxz nccl_2.7.3-1+cuda10.2_x86_64.txz && \
113+
# tar --no-same-owner --keep-old-files --no-overwrite-dir -xvf nccl_2.7.3-1+cuda10.2_x86_64.tar -C /usr/local/cuda/include/ --strip-components=2 --wildcards '*/include/*' && \
114+
tar --no-same-owner --keep-old-files -xvf nccl_2.7.3-1+cuda10.2_x86_64.tar -C /usr/local/cuda/include/ --strip-components=2 --wildcards '*/include/*' && \
115+
# tar --no-same-owner --keep-old-files --no-overwrite-dir -xvf nccl_2.7.3-1+cuda10.2_x86_64.tar -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so' && \
116+
tar --no-same-owner --keep-old-files -xvf nccl_2.7.3-1+cuda10.2_x86_64.tar -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so' && \
117+
118+
rm -f nccl_2.7.3-1+cuda10.2_x86_64.tar && \
119+
ldconfig
120+
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
121+
122+
# 10.2-cudnn7-devel-centos7
123+
ENV CUDNN_VERSION 7.6.5.32
124+
# cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
125+
RUN CUDNN_DOWNLOAD_SUM=600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f7088c20 && \
126+
curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.5/cudnn-10.2-linux-x64-v7.6.5.32.tgz -O && \
127+
echo "$CUDNN_DOWNLOAD_SUM cudnn-10.2-linux-x64-v7.6.5.32.tgz" | sha256sum -c - && \
128+
tar --no-same-owner -xzf cudnn-10.2-linux-x64-v7.6.5.32.tgz -C /usr/local && \
129+
rm cudnn-10.2-linux-x64-v7.6.5.32.tgz && \
130+
ldconfig
131+
132+
# install gcc-8.5.0 for nccl
133+
RUN dnf install gcc
134+
ENV PATH /usr/bin:$PATH
135+
RUN gcc --version
136+
137+
# install nccl for distributed training
138+
RUN git clone https://github.com/NVIDIA/nccl.git $HOME/nccl \
139+
&& cd $HOME/nccl \
140+
&& git checkout v2.4.8-1 \
141+
&& make BUILDDIR=/usr/local/ -j$(nproc) src.build \
142+
&& rm -rf /usr/local/obj \
143+
&& rm -rf $HOME/nccl
144+
145+
# install cnmem to /usr/local/include /usr/local/lib
146+
RUN git clone https://github.com/NVIDIA/cnmem.git cnmem \
147+
&& cd cnmem && mkdir build && cd build && cmake .. && make && make install && cd ../.. && rm -rf cnmem
148+
149+
# install mpich /usr/local/include /usr/local/lib
150+
RUN wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz -P $HOME \
151+
&& cd $HOME \
152+
&& tar xfz mpich-3.3.2.tar.gz \
153+
&& cd mpich-3.3.2 \
154+
&& ./configure --prefix=/usr/local --disable-fortran \
155+
&& make && make install && cd .. && rm -rf mpich-3.3.2

tool/wheel.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ rm -rf dist
2424

2525
# build cpu only wheel packages
2626
rm -rf build
27-
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel
27+
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel
2828
rm -rf build
29-
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
29+
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel
3030
rm -rf build
31-
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel
31+
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel
3232

3333
# build cuda enabled wheel packages
3434
export SINGA_CUDA=ON
3535
rm -rf build
36-
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel
36+
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel
3737
rm -rf build
38-
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
38+
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel
3939
rm -rf build
40-
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel
40+
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel
4141

4242
# repair the wheel files in dist/*.whl and store the results into wheelhouse/
43-
/opt/python/cp38-cp38/bin/python setup.py audit
43+
/opt/python/cp311-cp311/bin/python setup.py audit

0 commit comments

Comments
 (0)