-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 1003 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 1003 Bytes
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
# Constructs the environment within which we will build the pip wheels.
ARG AUDITWHEEL_PLATFORM
FROM quay.io/pypa/${AUDITWHEEL_PLATFORM}
ARG PYTHON_VERSION
ARG BAZEL_VERSION
ENV DEBIAN_FRONTEND=noninteractive
RUN ulimit -n 1024 && yum install -y rsync
ENV PYTHON_BIN_PATH=/opt/python/cp${PYTHON_VERSION}-cp${PYTHON_VERSION}/bin
ENV PATH="${PYTHON_BIN_PATH}:${PATH}"
ENV PYTHON_BIN=${PYTHON_BIN_PATH}/python
# Download the correct bazel version and make sure it's on path.
RUN BAZEL_ARCH_SUFFIX="$(uname -m | sed s/aarch64/arm64/)" \
&& curl -sSL --fail -o /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-$BAZEL_ARCH_SUFFIX" \
&& chmod a+x /usr/local/bin/bazel
# Install dependencies needed for array_record.
RUN --mount=type=cache,target=/root/.cache \
$PYTHON_BIN -m pip install -U \
absl-py \
auditwheel \
etils[epath] \
patchelf \
setuptools \
twine \
wheel;
WORKDIR "/tmp/array_record"