-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
97 lines (79 loc) · 2.92 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#designed for linux build
FROM rust:1.63.0
WORKDIR /
# set environment variables
ENV PATH=$PATH:/Chunkus/Rust_part/target/release
RUN apt-get update
RUN apt-get install cmake -y
RUN apt-get install build-essential -y
RUN apt-get install mesa-common-dev -y
RUN apt-get install libxi-dev -y
RUN apt-get install libx11-dev -y
RUN apt-get install libgl1-mesa-dev -y
RUN apt-get install libglu1-mesa-dev -y
#opencl dependencies
RUN apt-get install libxrandr-dev -y
RUN apt-get install libudev-dev -y
RUN rustup target add x86_64-unknown-linux-musl && \
rustup default stable
# initialize build tools
RUN git clone https://github.com/madler/zlib.git && \
git clone https://github.com/glennrp/libpng.git && \
git clone https://github.com/memononen/nanosvg.git && \
git clone https://github.com/FreeGLUTProject/freeglut.git && \
git clone https://github.com/sammycage/lunasvg.git && \
git clone https://github.com/winlibs/libjpeg.git && \
git clone https://github.com/KhronosGroup/OpenCL-SDK.git
RUN echo "Building zlib..."
WORKDIR /zlib
RUN git checkout v1.2.12
RUN cmake -B build -G "Unix Makefiles" -D CMAKE_INSTALL_PREFIX="install"
RUN cmake --build build -j4
RUN cmake --install build
RUN echo "Building libpng..."
WORKDIR /libpng
RUN git checkout v1.6.35
RUN cmake -B build -G "Unix Makefiles" -D ZLIB_ROOT="../zlib/install"
RUN cmake --build build -j4
RUN cmake --install build --prefix png-install
RUN echo "Building nanosvg..."
WORKDIR /nanosvg
RUN git checkout 3bcdf2f3cdc1bf9197c2dce81368bfc6f99205a7
RUN cmake -B build -G "Unix Makefiles"
RUN cmake --build build -j4
RUN cmake --install build --prefix install
RUN echo "Building freeglut..."
WORKDIR /freeglut
RUN git checkout v3.2.2
RUN cmake -B build -G "Unix Makefiles"
RUN cmake --build build -j4
RUN cmake --install build --prefix install
RUN echo "Building lunasvg..."
WORKDIR /lunasvg
RUN git checkout v2.3.1
RUN cmake -B build -G "Unix Makefiles"
RUN cmake --build build -j4
RUN cmake --install build --prefix install
RUN echo "Building libjpeg-turbo..."
WORKDIR /libjpeg
RUN git checkout libjpeg-turbo-2.1.0
RUN cmake -B build -G "Unix Makefiles"
RUN cmake --build build -j4
RUN cmake --install build --prefix install
Run echo "Building OpenCL..."
WORKDIR /OpenCL-SDK
git checkout v2022.09.30
cmake -G "Unix Makefiles" -D CMAKE_INSTALL_PREFIX=install -B build -S ./
cmake --build build -j4 --config Release --target install -- /m /v:minimal
cmake --install build --prefix install
COPY ./ /Chunkus
RUN echo "building Chunkus..."
WORKDIR /Chunkus
RUN cmake -B build -G "Unix Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -D CMAKE_INSTALL_PREFIX="install" -D CMAKE_BUILD_TYPE="Debug" -D CMAKE_C_COMPILER="gcc"
RUN cmake --build build -j4 --config Release
RUN cmake --install build --prefix install
#build Rust code
WORKDIR /Chunkus/Rust_part/
RUN cargo build -vv
#only receives bot commands in debug mode for some reason
CMD ["./target/debug/trampoline", "false"]