From d2024b1f4e8cc500595655ac3ea558f86b56d9e2 Mon Sep 17 00:00:00 2001 From: Krishna Pai Date: Thu, 4 Jan 2024 17:09:31 -0800 Subject: [PATCH] Create new docker image for linux adapters. --- docker-compose.yml | 18 ++++++++++++++++++ scripts/adapters-container.dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 scripts/adapters-container.dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 45c64314b8b90..e2c0d76373f6f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -90,3 +90,21 @@ services: volumes: - .:/velox:delegated command: /bin/bash -c "scl enable gcc-toolset-9 '/velox/scripts/docker-command.sh'" + + linux-adapters: + # Usage: + # docker-compose pull linux-adapters or docker-compose build linux-adapters + # docker-compose run --rm linux-adapters + # or + # docker-compose run -e NUM_THREADS= --rm linux-adapters + # to set the number of threads used during compilation + image: ghcr.io/facebookincubator/velox-dev:amd64-centos-8-avx + build: + context: . + dockerfile: scripts/adapters-container.dockerfile + environment: + NUM_THREADS: 8 # default value for NUM_THREADS + CCACHE_DIR: "/velox/.ccache" + volumes: + - .:/velox:delegated + command: /bin/bash -c "scl enable gcc-toolset-9 '/velox/scripts/docker-command.sh'" diff --git a/scripts/adapters-container.dockerfile b/scripts/adapters-container.dockerfile new file mode 100644 index 0000000000000..6f6e331821096 --- /dev/null +++ b/scripts/adapters-container.dockerfile @@ -0,0 +1,25 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Licensed 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. +# Build the test and build container for presto_cpp +# +FROM quay.io/centos/centos:stream8 +ARG cpu_target +COPY scripts/setup-circleci.sh / +COPY scripts/setup-helper-functions.sh / +RUN mkdir build && ( cd build && CPU_TARGET="$cpu_target" bash /setup-circleci.sh ) && rm -rf build + +RUN dnf install java-1.8.0-openjdk wget\ + && wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20220526054841.0.0.x86_64.rpm \ + && rpm -i minio-20220526054841.0.0.x86_64.rpm \ + && rm minio-20220526054841.0.0.x86_64.rpm \