-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new docker image with minimal TVM configuration
- Loading branch information
Florin-Gabriel Blanaru
committed
Jul 24, 2022
1 parent
f00f461
commit c698cb5
Showing
6 changed files
with
155 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 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. | ||
|
||
# CI docker minimal CPU env | ||
FROM ubuntu:18.04 | ||
|
||
COPY utils/apt-install-and-clear.sh /usr/local/bin/apt-install-and-clear | ||
|
||
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_googletest.sh /install/ubuntu_install_googletest.sh | ||
RUN bash /install/ubuntu_install_googletest.sh | ||
|
||
COPY install/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh | ||
RUN bash /install/ubuntu1804_install_python.sh | ||
|
||
# Globally disable pip cache | ||
RUN pip config set global.no-cache-dir false | ||
|
||
COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh | ||
RUN bash /install/ubuntu_install_python_package.sh | ||
|
||
COPY install/ubuntu1804_manual_install_llvm.sh /install/ubuntu1804_manual_install_llvm.sh | ||
RUN bash /install/ubuntu1804_manual_install_llvm.sh | ||
|
||
# Rust env (build early; takes a while) | ||
COPY install/ubuntu_install_rust.sh /install/ubuntu_install_rust.sh | ||
RUN bash /install/ubuntu_install_rust.sh | ||
ENV RUSTUP_HOME /opt/rust | ||
ENV CARGO_HOME /opt/rust | ||
ENV PATH $PATH:$CARGO_HOME/bin | ||
|
||
# AutoTVM deps | ||
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh | ||
RUN bash /install/ubuntu_install_redis.sh | ||
|
||
# sccache | ||
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh | ||
RUN bash /install/ubuntu_install_sccache.sh | ||
ENV PATH /opt/sccache:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/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 | ||
|
||
git clone --depth 1 --branch release/11.x https://github.com/llvm/llvm-project.git | ||
pushd llvm-project | ||
mkdir build | ||
pushd build | ||
cmake \ | ||
-G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DLLVM_ENABLE_ASSERTIONS=ON \ | ||
-DLLVM_ENABLE_PROJECTS="llvm;clang" \ | ||
../llvm | ||
ninja install | ||
popd | ||
popd | ||
rm -rf llvm-project | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env 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 -euxo pipefail | ||
|
||
BUILD_DIR=$1 | ||
mkdir -p "$BUILD_DIR" | ||
cd "$BUILD_DIR" | ||
cp ../cmake/config.cmake . | ||
|
||
echo set\(USE_SORT ON\) >> config.cmake | ||
echo set\(USE_LLVM llvm-config\) >> config.cmake | ||
echo set\(USE_RELAY_DEBUG ON\) >> config.cmake | ||
echo set\(CMAKE_CXX_FLAGS \"-Werror -Wp,-D_GLIBCXX_ASSERTIONS\"\) >> config.cmake | ||
echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake | ||
echo set\(USE_LIBBACKTRACE ON\) >> config.cmake | ||
echo set\(USE_CCACHE OFF\) >> config.cmake | ||
echo set\(SUMMARIZE ON\) >> config.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters