mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Fix Docker image build on Linux (#728)
* Fix Docker image build on Linux * Build Docker images in CI * Fix bash syntax * Only load, not push * Parallelize docker build It's currently the slowest step. * Only build Linux images
This commit is contained in:
parent
a83ce20fcc
commit
d1e533ffb9
11
.buildkite/build-docker-images.sh
Normal file
11
.buildkite/build-docker-images.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
echo "--- Building the Wolfi image"
|
||||
# Building the linux/arm64 image takes about one hour on Buildkite, which is too slow
|
||||
docker build --file Dockerfile.wolfi .
|
||||
|
||||
echo "--- Building the public image"
|
||||
docker build .
|
@ -15,6 +15,14 @@ steps:
|
||||
machineType: "n2-standard-2"
|
||||
commands:
|
||||
- ./.buildkite/build-documentation.sh
|
||||
- label: ":docker: Build docker image {{ matrix.platform }}"
|
||||
env:
|
||||
PYTHON_VERSION: 3.11-bookworm
|
||||
agents:
|
||||
provider: "gcp"
|
||||
machineType: "n2-standard-2"
|
||||
commands:
|
||||
- ./.buildkite/build-docker-images.sh
|
||||
- label: "Eland :python: {{ matrix.python }} :elasticsearch: {{ matrix.stack }}"
|
||||
agents:
|
||||
provider: "gcp"
|
||||
|
@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
python3 -m pip install \
|
||||
--no-cache-dir --disable-pip-version-check --extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
torch==2.1.2+cpu .[all]; \
|
||||
torch==2.3.1+cpu .[all]; \
|
||||
else \
|
||||
python3 -m pip install \
|
||||
--no-cache-dir --disable-pip-version-check \
|
||||
|
@ -13,7 +13,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
python3 -m pip install \
|
||||
--no-cache-dir --disable-pip-version-check --extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
torch==2.1.2+cpu .[all]; \
|
||||
torch==2.3.1+cpu .[all]; \
|
||||
else \
|
||||
python3 -m pip install \
|
||||
--no-cache-dir --disable-pip-version-check \
|
||||
|
Loading…
x
Reference in New Issue
Block a user