Skip to content

Commit 5f6c86f

Browse files
fix(docker): correct wheel output path and add workspace dependency builds
- Fix COPY path: uv build outputs wheels to workspace root dist/, not packages/<name>/dist/ - Agent: build core, textfsm, and agent wheels for complete dependency chain - Simunet: build core and simunet wheels for complete dependency chain
1 parent e9c1efc commit 5f6c86f

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

packages/agent/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ WORKDIR /build
1616
# Copy project files
1717
COPY . .
1818

19-
# Build the wheel using uv
20-
RUN uv build --directory packages/agent --wheel
19+
# Build all workspace dependency wheels
20+
RUN uv build --directory packages/core --wheel \
21+
&& uv build --directory packages/textfsm --wheel \
22+
&& uv build --directory packages/agent --wheel
2123

2224
# Final stage
2325
FROM ghcr.io/astral-sh/uv:python3.12-trixie
@@ -37,7 +39,7 @@ RUN useradd -m -u 1000 netdriver
3739
WORKDIR /app
3840

3941
# Copy built wheel and install it using uv
40-
COPY --from=builder /build/packages/agent/dist/*.whl /tmp/
42+
COPY --from=builder /build/dist/*.whl /tmp/
4143
RUN uv pip install --system --no-cache /tmp/*.whl \
4244
&& rm -rf /tmp/*.whl
4345

packages/simunet/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ WORKDIR /build
1616
# Copy project files
1717
COPY . .
1818

19-
# Build the wheel using uv
20-
RUN uv build --directory packages/simunet --wheel
19+
# Build all workspace dependency wheels
20+
RUN uv build --directory packages/core --wheel \
21+
&& uv build --directory packages/simunet --wheel
2122

2223
# Final stage
2324
FROM ghcr.io/astral-sh/uv:python3.12-trixie
@@ -37,7 +38,7 @@ RUN useradd -m -u 1000 netdriver
3738
WORKDIR /app
3839

3940
# Copy built wheel and install it using uv
40-
COPY --from=builder /build/packages/simunet/dist/*.whl /tmp/
41+
COPY --from=builder /build/dist/*.whl /tmp/
4142
RUN uv pip install --system --no-cache /tmp/*.whl \
4243
&& rm -rf /tmp/*.whl
4344

0 commit comments

Comments
 (0)