chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
FROM centos:7
|
||||
COPY ./build.sh /build.sh
|
||||
RUN chmod +x /build.sh
|
||||
ENV JAVA_HOME=/opt/zulu11.58.15-ca-jdk11.0.16-linux_x64
|
||||
ENTRYPOINT '/build.sh'
|
||||
@@ -0,0 +1,10 @@
|
||||
## Centos build for deeplearning4j
|
||||
Implements a centos 7 based build based on the following docs:
|
||||
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes
|
||||
https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
|
||||
https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions
|
||||
|
||||
This is for a -compat build for older glibcs mainly running on centos based systems.
|
||||
The action relies on volumes to just run an install workload followed by a deployment
|
||||
using the host's gpg signature infrastructure very similar to the existing linux-x86_64 builds
|
||||
based on ubuntu 16.04
|
||||
@@ -0,0 +1,6 @@
|
||||
name: Build deeplearning4j on centos 7
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
env
|
||||
## Based on the javacpp presets github actions centos 7 build at https://github.com/bytedeco/javacpp-presets/
|
||||
SCL_ENABLE="devtoolset-7"
|
||||
yum -y update && yum -y install wget unzip centos-release-scl-rh epel-release
|
||||
echo "Downloading java from azul"
|
||||
cd /opt && wget https://cdn.azul.com/zulu/bin/zulu11.58.15-ca-jdk11.0.16-linux_x64.zip
|
||||
echo "Downloaded azul java"
|
||||
ls /opt
|
||||
cd /opt && unzip zulu11.58.15-ca-jdk11.0.16-linux_x64.zip
|
||||
#zulu11.58.15-ca-jdk11.0.16-linux_x64
|
||||
yum -y install $SCL_ENABLE rh-java-common-ant boost-devel ccache clang gcc-c++ gcc-gfortran ant python python36-devel python36-pip swig file which wget unzip tar bzip2 gzip xz patch autoconf-archive automake make libtool bison flex perl nasm alsa-lib-devel freeglut-devel gtk2-devel libusb-devel libusb1-devel curl-devel expat-devel gettext-devel openssl-devel bzip2-devel zlib-devel SDL-devel libva-devel libxkbcommon-devel libxkbcommon-x11-devel xcb-util* fontconfig-devel libffi-devel ragel ocl-icd-devel GeoIP-devel pcre-devel ssdeep-devel yajl-devel
|
||||
sed -i 's/_mm512_abs_pd (__m512 __A)/_mm512_abs_pd (__m512d __A)/g' /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/include/avx512fintrin.h
|
||||
source scl_source enable $SCL_ENABLE || true
|
||||
curl -LO https://github.com/Kitware/CMake/releases/download/v3.16.6/cmake-3.16.6-Linux-x86_64.tar.gz
|
||||
curl -LO https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
|
||||
curl -LO https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.3.tar.gz
|
||||
tar -xzf cmake-3.16.6-Linux-x86_64.tar.gz -C /opt/
|
||||
mv /opt/cmake-3.16.6-Linux-x86_64 /opt/cmake
|
||||
tar -xzf apache-maven-3.6.3-bin.tar.gz -C /opt/
|
||||
tar -xzf git-2.18.3.tar.gz
|
||||
pushd git-2.18.3; make -j2 prefix=/usr/local/; make -j2 prefix=/usr/local/ install; popd
|
||||
ln -sf /usr/bin/python3.6 /usr/bin/python3
|
||||
ln -sf /opt/cmake-3.16.6-Linux-x86_64/bin/* /usr/bin/
|
||||
ln -sf /opt/apache-maven-3.6.3/bin/mvn /usr/bin/mvn
|
||||
curl -fsSL https://github.com/google/protobuf/releases/download/v3.8.0/protobuf-cpp-3.8.0.tar.gz \
|
||||
| tar xz && \
|
||||
cd protobuf-3.8.0 && \
|
||||
./configure --prefix=/opt/protobuf && \
|
||||
make -j2 && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf protobuf-3.8.0
|
||||
echo "/opt/protobuf/bin" >> $GITHUB_PATH
|
||||
# need to hardcode due to conflicting java home being set
|
||||
export JAVA_HOME=/opt/zulu11.58.15-ca-jdk11.0.16-linux_x64
|
||||
echo "${JAVA_HOME}/bin" >> $GITHUB_PATH
|
||||
export PATH=/opt/protobuf/bin:/opt/cmake/bin:$JAVA_HOME/bin:$PATH
|
||||
echo "JAVA_HOME ${JAVA_HOME}"
|
||||
java -version
|
||||
which javac
|
||||
mvn --version
|
||||
cmake --version
|
||||
protoc --version
|
||||
pwd
|
||||
# The volume directory for the workspace
|
||||
cd "/github/workspace/"
|
||||
bash ./bootstrap-libnd4j-from-url.sh
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$OPENBLAS_PATH"
|
||||
echo "Running INSTALL COMMAND ${INSTALL_COMMAND}"
|
||||
eval "${INSTALL_COMMAND}"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
name: Download dl4j test resources
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: bash
|
||||
run: |
|
||||
wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip
|
||||
cd dl4j-test-resources-master
|
||||
mvn clean install -DskipTests
|
||||
echo "Extracted test resources"
|
||||
@@ -0,0 +1,12 @@
|
||||
name: Download dl4j test resources
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: cmd
|
||||
run: |
|
||||
set "PATH=C:\msys64\usr\bin;%PATH%"
|
||||
wget https://github.com/KonduitAI/dl4j-test-resources/archive/master.zip && unzip master.zip
|
||||
cd dl4j-test-resources-master
|
||||
mvn clean install -DskipTests
|
||||
echo "Extracted test resources"
|
||||
@@ -0,0 +1,12 @@
|
||||
name: Download dl4j test resources
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt install git gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc \
|
||||
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf crossbuild-essential-arm64
|
||||
mkdir -p /opt/raspberrypi && \
|
||||
cd /opt/raspberrypi && \
|
||||
git clone git://github.com/raspberrypi/tools.git
|
||||
@@ -0,0 +1,11 @@
|
||||
name: Install protobuf linux
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install protobuf linux
|
||||
shell: bash
|
||||
run: |
|
||||
apt-get -yq update && apt-get install -y build-essential unzip libssl-dev
|
||||
curl -fsSL http://cmake.org/files/v3.28.3/cmake-3.28.3.tar.gz | tar xz && cd cmake-3.28.3
|
||||
./configure --prefix=/opt/cmake && make -j2 && make install && cd .. && rm -r cmake-3.28.3
|
||||
echo "/opt/cmake/bin" >> $GITHUB_PATH
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Install protobuf linux
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install protobuf linux
|
||||
shell: bash
|
||||
run: |
|
||||
curl -fsSL https://github.com/google/protobuf/releases/download/v3.8.0/protobuf-cpp-3.8.0.tar.gz \
|
||||
| tar xz && \
|
||||
cd protobuf-3.8.0 && \
|
||||
./configure --prefix=/opt/protobuf && \
|
||||
make -j2 && \
|
||||
sudo make install && \
|
||||
cd .. && \
|
||||
rm -rf protobuf-3.8.0
|
||||
echo "/opt/protobuf/bin" >> $GITHUB_PATH
|
||||
@@ -0,0 +1,10 @@
|
||||
name: Setup for msys2
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: cmd
|
||||
run: |
|
||||
msys2do pacman -S --needed --noconfirm base-devel git tar pkg-config unzip p7zip zip autoconf autoconf-archive automake patch
|
||||
msys2do pacman -S --needed mingw-w64-x86_64-make --noconfirm mingw-w64-x86_64-gnupg mingw-w64-x86_64-cmake mingw-w64-x86_64-nasm mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-SDL mingw-w64-x86_64-ragel mingw-w64-x86_64-sed
|
||||
echo '--yes --always-trust' >> ~/.gnupg/gpg.conf
|
||||
@@ -0,0 +1,9 @@
|
||||
name: Publish to github packages
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Publish to GitHub Packages
|
||||
run: mvn -Pgithub --batch-mode deploy
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,22 @@
|
||||
name: Remove un needed packages for linux
|
||||
description:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt remove -y mongodb-org *google-chrome* firefox apache2 kubectl esl-erlang hhvm nginx libpq-dev postgresql postgresql-client ruby-full powershell r-base mono-complete nuget
|
||||
sudo rm -rf /usr/share/java/selnium*
|
||||
sudo rm -rf /usr/local/share/phantomjs*
|
||||
sudo rm -rf /usr/local/share/gecko_driver*
|
||||
sudo rm -rf /usr/local/lib/lein*
|
||||
sudo rm -rf /usr/share/miniconda*
|
||||
sudo apt remove -y apache2-bin* azure-cli dotnet-* ghc-* google-cloud-sdk* libboost-* libmono-* libobjc-* moby-* mono-* mysql* postgresql* r-* ruby* sqlite3* swig*
|
||||
sudo apt-get autoclean
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
df -h
|
||||
@@ -0,0 +1,39 @@
|
||||
name: Set OS install version
|
||||
description:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Initial install
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS="$NAME"
|
||||
VER="$VERSION_ID"
|
||||
elif [ type lsb_release >/dev/null 2>&1 ]; then
|
||||
# linuxbase.org
|
||||
OS="$(lsb_release -si)"
|
||||
VER="$(lsb_release -sr)"
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
/etc/lsb-release
|
||||
OS="$DISTRIB_ID"
|
||||
VER="$DISTRIB_RELEASE"
|
||||
elif [ -f /etc/debian_version ]; then
|
||||
OS="Debian"
|
||||
VER="$(cat /etc/debian_version)"
|
||||
elif [ -f /etc/SuSe-release ]; then
|
||||
OS="SUSE"
|
||||
VER="13.1"
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
# Older Red Hat, CentOS, etc.
|
||||
OS="Centos"
|
||||
VER="6"
|
||||
else
|
||||
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
|
||||
OS="$(uname -s)"
|
||||
VER="$(uname -r)"
|
||||
fi
|
||||
|
||||
echo "OS=$OS" >> "$GITHUB_ENV"
|
||||
echo "VER=$VER" >> "$GITHUB_ENV"
|
||||
echo "OS is $OS and VERSION is $VER"
|
||||
@@ -0,0 +1,13 @@
|
||||
name: Update dependencies linux
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Update dependencies linux
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get install build-essential make zlib1g-dev wget
|
||||
sudo apt-get install pinentry-curses
|
||||
sudo apt-get install ca-certificates libgomp1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user