Skip to content

Commit

Permalink
[CI] Update ci-cpu to bionic (apache#5554)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and Trevor Morris committed Jun 9, 2020
1 parent fc14b92 commit bc67bd2
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docker/Dockerfile.ci_cpu
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
# under the License.

# CI docker CPU env
# tag: v0.55
FROM ubuntu:16.04
# tag: v0.62
FROM ubuntu:18.04

RUN apt-get update --fix-missing

COPY install/ubuntu_install_core.sh /install/ubuntu_install_core.sh
RUN bash /install/ubuntu_install_core.sh

COPY install/ubuntu_install_python.sh /install/ubuntu_install_python.sh
RUN bash /install/ubuntu_install_python.sh
COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh

COPY install/ubuntu_install_llvm.sh /install/ubuntu_install_llvm.sh
RUN bash /install/ubuntu_install_llvm.sh
COPY install/ubuntu1804_install_llvm.sh /install/ubuntu1804_install_llvm.sh
RUN bash /install/ubuntu1804_install_llvm.sh

# Rust env (build early; takes a while)
COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh
Expand Down
40 changes: 40 additions & 0 deletions docker/install/ubuntu1804_install_llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

set -e
set -u
set -o pipefail

echo deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main\
>> /etc/apt/sources.list.d/llvm.list


echo deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main\
>> /etc/apt/sources.list.d/llvm.list

echo deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\
>> /etc/apt/sources.list.d/llvm.list

wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get update && apt-get install -y llvm-9 llvm-10 llvm-11 clang-9 clang-10 clang-11
32 changes: 32 additions & 0 deletions docker/install/ubuntu1804_install_python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

set -e
set -u
set -o pipefail

# install python and pip, don't modify this, modify install_python_package.sh
apt-get update
apt-get install -y software-properties-common
apt-get install -y python3-dev python3-setuptools

# Install pip
cd /tmp && wget -q https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py

# Pin pip version
pip3 install pip==19.3.1
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_nnpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -e
set -u
set -o pipefail

apt-get update && apt-get install -y --no-install-recommends git cmake
apt-get update && apt-get install -y --no-install-recommends git cmake python-setuptools

git clone https://github.com/Maratyszcza/NNPACK NNPACK
git clone https://github.com/Maratyszcza/pthreadpool NNPACK/pthreadpool
Expand Down
5 changes: 2 additions & 3 deletions docker/install/ubuntu_install_redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -21,5 +21,4 @@ set -u
set -o pipefail

apt-get update && apt-get install -y redis-server
pip2 install xgboost psutil
pip3 install xgboost psutil
4 changes: 1 addition & 3 deletions docker/install/ubuntu_install_tflite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ cd ..

# Install flatbuffers python packages.
pip3 install flatbuffers
pip2 install flatbuffers

# Build the TFLite static library, necessary for building with TFLite ON.
# The library is built at:
Expand Down Expand Up @@ -69,9 +68,8 @@ cat <<EOM >__init__.py
name = "tflite"
EOM

# Install tflite over python2 and python3
# Install tflite over python3
python3 setup.py install
python2 setup.py install

cd ..
rm -rf tflite

0 comments on commit bc67bd2

Please sign in to comment.