File tree Expand file tree Collapse file tree 7 files changed +80
-6
lines changed Expand file tree Collapse file tree 7 files changed +80
-6
lines changed Original file line number Diff line number Diff line change
1
+ ARG BASE_IMAGE=ubuntu:22.04
2
+
3
+ FROM ${BASE_IMAGE} AS builder
4
+ ARG BACKEND=rerankers
5
+ ARG BUILD_TYPE
6
+ ENV BUILD_TYPE=${BUILD_TYPE}
7
+ ARG CUDA_MAJOR_VERSION
8
+ ENV CUDA_MAJOR_VERSION=${CUDA_MAJOR_VERSION}
9
+ ENV DEBIAN_FRONTEND=noninteractive
10
+
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends \
13
+ curl python3-pip \
14
+ python-is-python3 \
15
+ python3-dev llvm \
16
+ python3-venv make && \
17
+ apt-get clean && \
18
+ rm -rf /var/lib/apt/lists/* && \
19
+ pip install --upgrade pip
20
+
21
+
22
+ # Install uv as a system package
23
+ RUN curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/bin sh
24
+ ENV PATH="/root/.cargo/bin:${PATH}"
25
+
26
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
27
+
28
+ # Install grpcio-tools (the version in 22.04 is too old)
29
+ RUN pip install --user grpcio-tools==1.71.0 grpcio==1.71.0
30
+
31
+ COPY ${BACKEND} /${BACKEND}
32
+ COPY common/ /${BACKEND}/common
33
+
34
+ RUN cd /${BACKEND} && make
35
+
36
+ FROM scratch
37
+ ARG BACKEND=rerankers
38
+ COPY --from=builder /${BACKEND}/ /
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- source $( dirname $0 ) /../common/libbackend.sh
4
+ backend_dir=$( dirname $0 )
5
+
6
+ if [ -d $backend_dir /common ]; then
7
+ source $backend_dir /common/libbackend.sh
8
+ else
9
+ source $backend_dir /../common/libbackend.sh
10
+ fi
5
11
6
12
# This is here because the Intel pip index is broken and returns 200 status codes for every package name, it just doesn't return any package links.
7
13
# This makes uv think that the package exists in the Intel pip index, and by default it stops looking at other pip indexes once it finds a match.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- source $( dirname $0 ) /../common/libbackend.sh
2
+
3
+ backend_dir=$( dirname $0 )
4
+ if [ -d $backend_dir /common ]; then
5
+ source $backend_dir /common/libbackend.sh
6
+ else
7
+ source $backend_dir /../common/libbackend.sh
8
+ fi
3
9
4
10
startBackend $@
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- source $( dirname $0 ) /../common/libbackend.sh
4
+ backend_dir=$( dirname $0 )
5
+ if [ -d $backend_dir /common ]; then
6
+ source $backend_dir /common/libbackend.sh
7
+ else
8
+ source $backend_dir /../common/libbackend.sh
9
+ fi
5
10
6
11
runUnittests
Original file line number Diff line number Diff line change 3
3
4
4
EXTRA_PIP_INSTALL_FLAGS=" --no-build-isolation"
5
5
6
- source $( dirname $0 ) /../common/libbackend.sh
6
+ backend_dir=$( dirname $0 )
7
+
8
+ if [ -d $backend_dir /common ]; then
9
+ source $backend_dir /common/libbackend.sh
10
+ else
11
+ source $backend_dir /../common/libbackend.sh
12
+ fi
7
13
8
14
# This is here because the Intel pip index is broken and returns 200 status codes for every package name, it just doesn't return any package links.
9
15
# This makes uv think that the package exists in the Intel pip index, and by default it stops looking at other pip indexes once it finds a match.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- source $( dirname $0 ) /../common/libbackend.sh
2
+
3
+ backend_dir=$( dirname $0 )
4
+
5
+ if [ -d $backend_dir /common ]; then
6
+ source $backend_dir /common/libbackend.sh
7
+ else
8
+ source $backend_dir /../common/libbackend.sh
9
+ fi
3
10
4
11
startBackend $@
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- source $( dirname $0 ) /../common/libbackend.sh
4
+ backend_dir=$( dirname $0 )
5
+
6
+ if [ -d $backend_dir /common ]; then
7
+ source $backend_dir /common/libbackend.sh
8
+ else
9
+ source $backend_dir /../common/libbackend.sh
10
+ fi
5
11
6
12
runUnittests
You can’t perform that action at this time.
0 commit comments