Skip to content

Commit

Permalink
docker update
Browse files Browse the repository at this point in the history
  • Loading branch information
yzh119 committed Nov 19, 2022
1 parent a1913f3 commit d272aa5
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 57 deletions.
114 changes: 60 additions & 54 deletions docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,35 @@

# CI docker GPU env
# tag: v0.60
FROM nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
FROM nvidia/cuda:11.6.0-cudnn8-devel-ubuntu20.04 as base

ENV DEBIAN_FRONTEND=noninteractive

# Per https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212772
# we need to add a new GPG key before running apt update.
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub

# Base scripts
RUN rm /etc/apt/sources.list.d/nvidia-ml.list && apt-get clean
RUN apt-get clean
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/ubuntu1804_install_python.sh /install/ubuntu1804_install_python.sh
RUN bash /install/ubuntu1804_install_python.sh
COPY install/ubuntu2004_install_python.sh /install/ubuntu2004_install_python.sh
RUN bash /install/ubuntu2004_install_python.sh

# Globally disable pip cache
RUN pip config set global.no-cache-dir false

COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
RUN bash /install/ubuntu_install_cmake_source.sh

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

COPY install/ubuntu_install_opencl.sh /install/ubuntu_install_opencl.sh
RUN bash /install/ubuntu_install_opencl.sh
# COPY install/ubuntu_install_opencl.sh /install/ubuntu_install_opencl.sh
# RUN bash /install/ubuntu_install_opencl.sh

COPY install/ubuntu_install_python_package.sh /install/ubuntu_install_python_package.sh
RUN bash /install/ubuntu_install_python_package.sh
Expand All @@ -52,83 +54,87 @@ COPY install/ubuntu_install_sphinx.sh /install/ubuntu_install_sphinx.sh
RUN bash /install/ubuntu_install_sphinx.sh

# Enable doxygen for c++ doc build
RUN apt-get update && apt-get install -y doxygen libprotobuf-dev protobuf-compiler
# RUN apt-get update && apt-get install -y doxygen libprotobuf-dev protobuf-compiler

COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
RUN bash /install/ubuntu_install_java.sh
# COPY install/ubuntu_install_java.sh /install/ubuntu_install_java.sh
# RUN bash /install/ubuntu_install_java.sh

COPY install/ubuntu_install_nodejs.sh /install/ubuntu_install_nodejs.sh
RUN bash /install/ubuntu_install_nodejs.sh
# COPY install/ubuntu_install_nodejs.sh /install/ubuntu_install_nodejs.sh
# RUN bash /install/ubuntu_install_nodejs.sh

COPY install/ubuntu_install_rocm.sh /install/ubuntu_install_rocm.sh
RUN bash /install/ubuntu_install_rocm.sh
# COPY install/ubuntu_install_rocm.sh /install/ubuntu_install_rocm.sh
# RUN bash /install/ubuntu_install_rocm.sh

# DL Frameworks
COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh
RUN bash /install/ubuntu_install_mxnet.sh
# COPY install/ubuntu_install_mxnet.sh /install/ubuntu_install_mxnet.sh
# RUN bash /install/ubuntu_install_mxnet.sh

COPY install/ubuntu_install_gluoncv.sh /install/ubuntu_install_gluoncv.sh
RUN bash /install/ubuntu_install_gluoncv.sh
# COPY install/ubuntu_install_gluoncv.sh /install/ubuntu_install_gluoncv.sh
# RUN bash /install/ubuntu_install_gluoncv.sh

COPY install/ubuntu_install_coreml.sh /install/ubuntu_install_coreml.sh
RUN bash /install/ubuntu_install_coreml.sh
# COPY install/ubuntu_install_coreml.sh /install/ubuntu_install_coreml.sh
# RUN bash /install/ubuntu_install_coreml.sh

COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh
RUN bash /install/ubuntu_install_tensorflow.sh
# COPY install/ubuntu_install_tensorflow.sh /install/ubuntu_install_tensorflow.sh
# RUN bash /install/ubuntu_install_tensorflow.sh

COPY install/ubuntu_install_darknet.sh /install/ubuntu_install_darknet.sh
RUN bash /install/ubuntu_install_darknet.sh
# COPY install/ubuntu_install_darknet.sh /install/ubuntu_install_darknet.sh
# RUN bash /install/ubuntu_install_darknet.sh

COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
RUN bash /install/ubuntu_install_onnx.sh
# COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
# RUN bash /install/ubuntu_install_onnx.sh

COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh
RUN bash /install/ubuntu_install_tflite.sh
# COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh
# RUN bash /install/ubuntu_install_tflite.sh

COPY install/ubuntu_install_dgl.sh /install/ubuntu_install_dgl.sh
RUN bash /install/ubuntu_install_dgl.sh

ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility
COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
RUN bash /install/ubuntu_install_vulkan.sh
COPY install/ubuntu_install_torch.sh /install/ubuntu_install_torch.sh
RUN bash /install/ubuntu_install_torch.sh


# ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility
# COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
# RUN bash /install/ubuntu_install_vulkan.sh

COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh
RUN bash /install/ubuntu_install_paddle.sh
# COPY install/ubuntu_install_paddle.sh /install/ubuntu_install_paddle.sh
# RUN bash /install/ubuntu_install_paddle.sh

# OneFlow deps
COPY install/ubuntu_install_oneflow.sh /install/ubuntu_install_oneflow.sh
RUN bash /install/ubuntu_install_oneflow.sh
# COPY install/ubuntu_install_oneflow.sh /install/ubuntu_install_oneflow.sh
# RUN bash /install/ubuntu_install_oneflow.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
# 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

# wasmtime
COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
RUN bash /install/ubuntu_install_wasmtime.sh
# COPY install/ubuntu_install_wasmtime.sh /install/ubuntu_install_wasmtime.sh
# RUN bash /install/ubuntu_install_wasmtime.sh

# AutoTVM deps
COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
RUN bash /install/ubuntu_install_redis.sh
# COPY install/ubuntu_install_redis.sh /install/ubuntu_install_redis.sh
# RUN bash /install/ubuntu_install_redis.sh

# NNPACK deps
COPY install/ubuntu_install_nnpack.sh /install/ubuntu_install_nnpack.sh
RUN bash /install/ubuntu_install_nnpack.sh
# COPY install/ubuntu_install_nnpack.sh /install/ubuntu_install_nnpack.sh
# RUN bash /install/ubuntu_install_nnpack.sh

# BYODT deps
COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh
RUN bash /install/ubuntu_install_universal.sh
# COPY install/ubuntu_install_universal.sh /install/ubuntu_install_universal.sh
# RUN bash /install/ubuntu_install_universal.sh

# PAPI profiling deps
COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
RUN bash /install/ubuntu_install_papi.sh "cuda rocm"
# COPY install/ubuntu_install_papi.sh /install/ubuntu_install_papi.sh
# RUN bash /install/ubuntu_install_papi.sh "cuda rocm"

# sccache
COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
RUN bash /install/ubuntu_install_sccache.sh
# COPY install/ubuntu_install_sccache.sh /install/ubuntu_install_sccache.sh
# RUN bash /install/ubuntu_install_sccache.sh

# Environment variables
ENV PATH=/usr/local/nvidia/bin:${PATH}
Expand Down
34 changes: 34 additions & 0 deletions docker/install/ubuntu2004_install_llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/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/focal/ llvm-toolchain-focal main >> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main >> /etc/apt/sources.list.d/llvm.list

# 14
echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main >> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 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-14 \
clang-14 libclang-14-dev
4 changes: 2 additions & 2 deletions docker/install/ubuntu2004_install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ trap cleanup 0
# instead modify install_python_package.sh
apt-get update
apt-get install -y software-properties-common
apt-get install -y python3.8 python3.8-dev python3-pip
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
apt-get install -y python3.9 python3.9-dev python3-pip
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1

# Pin pip and setuptools versions
# Hashes generated via:
Expand Down
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_dgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ set -e
set -u
set -o pipefail

pip3 install dgl==v0.7.2 -f https://data.dgl.ai/wheels/repo.html
pip3 install dgl-cu116==v0.9.1 -f https://data.dgl.ai/wheels/repo.html
23 changes: 23 additions & 0 deletions docker/install/ubuntu_install_torch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/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

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

0 comments on commit d272aa5

Please sign in to comment.