Skip to content

Commit df2f226

Browse files
committed
work around lack of unzip in linux docker image
1 parent e7abc9e commit df2f226

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

recipe/build-core.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ build --experimental_ui_max_stdouterr_bytes=16000000
3434
build --local_ram_resources=HOST_RAM*.8 --local_cpu_resources=2
3535
EOF
3636
else
37-
# make sure base image has unzip, build isolation requires it in /bin:/usr/bin:/usr/local/bin
38-
echo installing unzip
39-
sudo apt install -y unzip
40-
echo done installing unzip
37+
# set UNZIP, https://github.com/conda-forge/docker-images/issues/311
38+
export UNZIP=$(which unzip)
4139
fi
4240

4341
echo '---------------- .bazelrc --------------------------'

recipe/meta.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ source:
2727
- patches/0010-patch-bundled-fmt-in-spdlog-for-invalid-char8_type.patch
2828
# Avoid building openssl-1.1.1f and redis, not needed in the shipped package
2929
- patches/0011-do-not-build-redis-openssl.patch
30+
# https://github.com/conda-forge/docker-images/issues/311
31+
- patches/0012-use-unzip-from-env.patch # [linux]
3032

3133
build:
3234
number: 0
@@ -86,6 +88,8 @@ outputs:
8688
- psutil
8789
- python
8890
- setproctitle >=1.2.2,<1.4
91+
# see https://github.com/conda-forge/docker-images/issues/311
92+
- unzip # [linux]
8993
- cross-python_{{ target_platform }} # [build_platform != target_platform]
9094
host:
9195
- python
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 27bb3b1baa25830f790318234042d06039b588af Mon Sep 17 00:00:00 2001
2+
From: mattip <matti.picus@gmail.com>
3+
Date: Mon, 1 Sep 2025 09:20:56 +0300
4+
Subject: [PATCH] use unzip from env
5+
6+
---
7+
BUILD.bazel | 10 +++++-----
8+
1 file changed, 5 insertions(+), 5 deletions(-)
9+
10+
diff --git a/BUILD.bazel b/BUILD.bazel
11+
index 804a9591b9..ebae185af6 100644
12+
--- a/BUILD.bazel
13+
+++ b/BUILD.bazel
14+
@@ -412,8 +412,8 @@ genrule(
15+
16+
tmpdir=$$(mktemp -d)
17+
18+
- unzip -o -q $(location :core_py_proto_zip) -d "$$tmpdir"
19+
- unzip -o -q $(location :serve_py_proto_zip) -d "$$tmpdir"
20+
+ $$(UNZIP) -o -q $(location :core_py_proto_zip) -d "$$tmpdir"
21+
+ $$(UNZIP) -o -q $(location :serve_py_proto_zip) -d "$$tmpdir"
22+
23+
files=(
24+
$$(ls "$$tmpdir"/ray/core/generated/*_pb2*.py)
25+
@@ -450,7 +450,7 @@ genrule(
26+
set -euo pipefail
27+
28+
rm -rf python/ray/core/generated python/ray/serve/generated
29+
- unzip -o -q $(location :ray_py_proto_zip) -d python
30+
+ $$(UNZIP) -o -q $(location :ray_py_proto_zip) -d python
31+
32+
echo "$${PWD}" > $@
33+
""",
34+
@@ -469,8 +469,8 @@ genrule(
35+
set -euo pipefail
36+
37+
rm -rf python/ray/core/generated python/ray/serve/generated
38+
- unzip -o -q $(location :ray_py_proto_zip) -d "python"
39+
- unzip -o -q $(location :ray_pkg_zip) -d "python"
40+
+ $$(UNZIP) -o -q $(location :ray_py_proto_zip) -d "python"
41+
+ $$(UNZIP) -o -q $(location :ray_pkg_zip) -d "python"
42+
43+
echo "$${PWD}" > $@
44+
""",
45+
--
46+
2.43.0
47+

0 commit comments

Comments
 (0)