forked from hogepodge/tvm-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (44 loc) · 1.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM ubuntu:latest
# The pipeline is a colon separated ordered list
ARG CONFIG_PIPELINE=base:static:devel
ARG BUILD_PIPELINE=tvm:python:wheels:docs
USER root
# Make apt non-interactive to keep installation from being blocked
ENV DEBIAN_FRONTEND=noninteractive
# Bring the image up to date
RUN apt-get dist-upgrade -y \
&& apt update -y \
&& apt upgrade -y \
&& apt install -y git
# The pipeline scripts
ADD config.sh config.sh
ADD build.sh build.sh
# The pipeline directories
ADD config config
ADD build build
# install sudo and don't fail
RUN yes O | apt install -y sudo
# Create the tvm user
RUN groupadd -r tvm -g 3604 \
&& useradd -u 3604 -r -g tvm -m -c "TVM user" -s /bin/bash tvm \
&& usermod -aG sudo tvm \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN sudo apt update -y
RUN ./config.sh $CONFIG_PIPELINE
USER tvm
# Download TVM
RUN cd \
&& git clone --recursive https://github.com/apache/tvm tvm \
&& cd tvm \
&& git submodule init \
&& git submodule update
# Set up the build directory
RUN cd /home/tvm/tvm \
&& mkdir build \
&& cat /home/tvm/tvm/cmake/config.cmake /home/tvm/cmake.txt >> build/config.cmake
RUN cat /home/tvm/tvm/build/config.cmake
ENV THREADS=8
# Run the custom build pipeline
#RUN ./build.sh $BUILD_PIPELINE
# Set up the working space
WORKDIR /home/tvm