Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (48 loc) · 2.34 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (48 loc) · 2.34 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# InferLoop Edge Runtime — CPU Experience Edition runtime image.
# Built from the closed-source artifacts produced by scripts/build.sh.
FROM ubuntu:24.04
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/inferloop-edge-runtime
COPY models/qwen/ ./models/qwen/
COPY artifacts/ ./_artifacts/
COPY conf/inferloop_edge.yaml ./conf/inferloop_edge.yaml
COPY scripts/run.sh ./run.sh
COPY scripts/check_oom_guard.sh ./check_oom_guard.sh
COPY scripts/collect_evidence.sh ./collect_evidence.sh
RUN mkdir -p ./lib ./bin ./plugin ./work \
&& cp ./_artifacts/libsdp.so ./lib/libsdp.so \
&& cp ./_artifacts/inferloop_edge ./bin/inferloop_edge \
&& cp ./_artifacts/libllm_agent_service.so ./plugin/ \
&& cp ./_artifacts/libllm_gpu_serving_service.so ./plugin/ \
&& cp ./_artifacts/libinferloop_agent_openai_service.so ./plugin/ \
&& cp ./_artifacts/libinferloop_static_web_service.so ./plugin/ \
&& cp ./_artifacts/test_inferloop_agent_services ./test_inferloop_agent_services \
&& for so in ./_artifacts/libllama.so* ./_artifacts/libggml*.so*; do \
[ -e "$so" ] || continue; \
cp -a "$so" ./lib/; \
done \
&& for bin in test_llm_gpu_serving_cpu_ops test_llm_gpu_serving_qwen2_cpu; do \
if [ -f "./_artifacts/$bin" ]; then \
cp "./_artifacts/$bin" "./$bin"; \
chmod 0555 "./$bin"; \
fi; \
done \
&& rm -rf ./_artifacts \
&& chmod 0555 ./run.sh ./check_oom_guard.sh ./collect_evidence.sh \
./bin/inferloop_edge ./plugin/*.so \
./test_inferloop_agent_services \
&& chmod 0755 ./work ./models ./models/qwen \
&& ldconfig -n ./lib
ENV LD_LIBRARY_PATH=/opt/inferloop-edge-runtime/lib:/opt/inferloop-edge-runtime/plugin
# Do not pin OMP_NUM_THREADS=1: the LLAMA backend uses llama.cpp n_threads /
# OpenMP workers. A process-wide OMP=1 collapses that pool. Prefer
# INFERLOOP_CPU_OP_THREADS (mapped to n_threads) as the parallelism knob.
ENV OPENBLAS_NUM_THREADS=1
ENV INFERLOOP_WORK_ROOT=/tmp/inferloop-edge-runtime
ENV INFERLOOP_MODEL_PROFILE=auto
ENV INFERLOOP_QWEN2_MODEL_DIR=/opt/inferloop-edge-runtime/models/qwen
ENV INFERLOOP_QWEN05B_MODEL=/opt/inferloop-edge-runtime/models/qwen
ENV INFERLOOP_CPU_OP_THREADS=8
ENTRYPOINT ["/opt/inferloop-edge-runtime/run.sh"]