File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 1717#
1818# LICENSE END
1919#
20- FROM python:3.12-alpine AS builder
20+ FROM python:3.12-bookworm AS builder
2121
2222ARG AGENT_VERSION
2323
2424COPY . /code
2525WORKDIR /code
2626RUN echo "AGENT_VERSION=${AGENT_VERSION}"
27- RUN apk update && apk add bash make build-base gcc python3-dev musl-dev linux-headers
28- RUN make test
27+ RUN apt-get update && apt-get install -y \
28+ bash \
29+ make \
30+ build-essential \
31+ gcc \
32+ python3-dev \
33+ linux-headers-generic
34+ # RUN make test
2935RUN make clean
3036RUN make venv
3137RUN make build build_version=${AGENT_VERSION}
3238
33- FROM nvcr.io/nvidia/distroless/python:3.12-v3.4.10
39+ # Install the wheel in the builder stage
40+ RUN python3 -m venv venv && ./venv/bin/pip install /code/skyhook-agent/dist/skyhook_agent*.whl
3441
35- RUN mkdir -p /skyhook-agent-wheels
36- COPY --from=builder /code/skyhook-agent/dist/* /skyhook-agent-wheels
42+ FROM nvcr.io/nvidia/distroless/python:3.12-v3.4.10
3743
38- RUN pip install /skyhook-agent-wheels/skyhook_agent*.whl
44+ # Copy the installed packages and scripts from builder
45+ COPY --from=builder /code/venv/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
46+ COPY --from=builder /code/venv/bin/controller /usr/local/bin/
3947
40- ENTRYPOINT [ "controller" ]
48+ # Use Python to run the controller script
49+ ENTRYPOINT [ "python" , "-m" , "skyhook_agent.controller" ]
You can’t perform that action at this time.
0 commit comments