-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsql.Dockerfile
74 lines (57 loc) · 2.1 KB
/
sql.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
# syntax=docker/dockerfile:1.3
ARG FROM_IMAGE
ARG BUILD_IMAGE
ARG DEVEL_IMAGE
FROM ${BUILD_IMAGE} as build
FROM ${DEVEL_IMAGE} as devel
WORKDIR /home/node
ENV RAPIDSAI_SKIP_DOWNLOAD=1
RUN --mount=type=bind,from=build,source=/opt/rapids/,target=/tmp/rapids/ \
npm install --omit=dev --omit=peer --omit=optional --legacy-peer-deps --force \
/tmp/rapids/rapidsai-core-*.tgz \
/tmp/rapids/rapidsai-cuda-*.tgz \
/tmp/rapids/rapidsai-rmm-*.tgz \
/tmp/rapids/rapidsai-cudf-*.tgz \
/tmp/rapids/rapidsai-sql-*.tgz; \
for x in cuda rmm cudf sql; do \
mkdir node_modules/@rapidsai/${x}/build/Release; \
tar -C node_modules/@rapidsai/${x}/build/Release \
-f /tmp/rapids/rapidsai_${x}-*-Linux.tar.gz \
--wildcards --strip-components=2 \
-x "**/lib/rapidsai_${x}.node" ; \
done; \
tar -C node_modules/@rapidsai/sql/build/Release \
-f /tmp/rapids/rapidsai_sql-*.tar.gz \
--wildcards --strip-components=2 \
-x "*/blazingsql-*.jar" ;
FROM scratch as ucx-deb-amd64
ONBUILD ARG UCX_VERSION=1.12.1
ONBUILD ARG LINUX_VERSION=ubuntu20.04
ONBUILD ADD https://github.com/openucx/ucx/releases/download/v${UCX_VERSION}/ucx-v${UCX_VERSION}-${LINUX_VERSION}-mofed5-cuda11.deb /ucx.deb
FROM ucx-deb-${TARGETARCH} as ucx-deb
FROM ${FROM_IMAGE}
SHELL ["/bin/bash", "-c"]
USER root
RUN --mount=type=bind,from=ucx-deb,target=/usr/src/ucx \
# Install dependencies
export DEBIAN_FRONTEND=noninteractive \
&& apt update \
&& apt install -y --no-install-recommends \
# UCX runtime dependencies
libibverbs1 librdmacm1 libnuma1 numactl \
# SQL dependencies
openjdk-8-jre-headless libboost-regex-dev libboost-system-dev libboost-filesystem-dev \
# Install UCX
&& dpkg -i /usr/src/ucx/ucx.deb || true && apt install --fix-broken \
# Clean up
&& apt autoremove -y && apt clean \
&& rm -rf \
/tmp/* \
/var/tmp/* \
/var/lib/apt/lists/* \
/var/cache/apt/archives/*
USER node
WORKDIR /home/node
COPY --from=devel --chown=node:node /home/node/node_modules node_modules
SHELL ["/bin/bash", "-l"]
CMD ["node"]