Skip to content

Commit 6db1aef

Browse files
committed
Dockerized the ml_extension
1 parent 65af003 commit 6db1aef

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.github
2+
.vscode
3+
build

Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM ubuntu
2+
3+
RUN apt update
4+
RUN apt-get install build-essential -y
5+
RUN apt-get install wget unzip curl cmake make git ninja-build g++ python3 -y
6+
7+
WORKDIR /root/temp
8+
RUN mkdir /root/utf8proc
9+
RUN wget https://github.com/JuliaStrings/utf8proc/archive/refs/tags/v2.10.0.tar.gz
10+
RUN tar -xvf v2.10.0.tar.gz && mv utf8proc-2.10.0 utf8proc
11+
RUN cd utf8proc && \
12+
mkdir build && \
13+
cmake -S . -B build && \
14+
cmake --build build && \
15+
make prefix="/root/utf8proc" && make install
16+
17+
WORKDIR /root/temp
18+
RUN rm -rf /root/onnxruntime && mkdir /root/onnxruntime
19+
RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.19.2/onnxruntime-linux-x64-1.19.2.tgz
20+
RUN tar -xvf onnxruntime-linux-x64-1.19.2.tgz && mv onnxruntime-linux-x64-1.19.2/* /root/onnxruntime/
21+
22+
WORKDIR /root
23+
RUN rm -rf /root/temp
24+
25+
WORKDIR /root/duckml
26+
COPY . .
27+
28+
RUN make clean
29+
RUN export ONNX_INSTALL_PREFIX="/root/onnxruntime" && export UTF8PROC_INCLUDE_DIRS="/root/utf8proc" && make debug GEN=ninja DISABLE_SANITIZER=1 ENABLE_PREDICT=1 USE_TORCH=0

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ PROJ_DIR := $(dir $(MKFILE_PATH))
2222

2323
ifeq ($(GEN),ninja)
2424
GENERATOR=-G "Ninja"
25-
FORCE_COLOR=-DFORCE_COLORED_OUTPUT=1
25+
ifneq ($(DOCKER), 1)
26+
FORCE_COLOR=-DFORCE_COLORED_OUTPUT=1
27+
endif
2628
endif
2729
ifeq (${TREAT_WARNINGS_AS_ERRORS}, 1)
2830
WARNINGS_AS_ERRORS=-DTREAT_WARNINGS_AS_ERRORS=1

third_party/predictors/onnx/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ set(CMAKE_CXX_STANDARD 17)
1010
find_library(ONNX_RUNTIME_LIB onnxruntime HINTS "$ENV{ONNX_INSTALL_PREFIX}/lib")
1111
message(STATUS "ORT Include Libs: ${ONNX_RUNTIME_SESSION_INCLUDE_DIRS}")
1212

13-
set(UTF8PROC_INSTALL_PREFIX "/homes/ukumaras/packages/utf8proc")
1413
find_path(UTF8PROC_INCLUDE_DIRS utf8proc.h HINTS "${UTF8PROC_INSTALL_PREFIX}/include")
15-
message(STATUS "UTF8LIB Include Libs: ${UTF_8_LIB}")
14+
message(STATUS "UTF8LIB Include Libs: ${UTF8PROC_INCLUDE_DIRS}")
1615

1716
find_library(UTF8PROC_LIB utf8proc HINTS "${UTF8PROC_INSTALL_PREFIX}/lib")
1817
message(STATUS "UTF8LIB Libs: ${UTF8PROC_LIB}")

0 commit comments

Comments
 (0)