Skip to content

Commit 3f435a7

Browse files
committed
Examples updates
1 parent 2c1500f commit 3f435a7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

examples/data-science/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage: Install dependencies with system build tools
2-
FROM ghcr.io/jski/python-container-builder:3.12 as build-venv
2+
FROM ghcr.io/jski/python-container-builder:3.11 AS build-venv
33

44
# Install build dependencies required for NumPy/Pandas compilation
55
# These packages are needed to build native extensions
@@ -21,17 +21,19 @@ COPY sample_data.csv /app/sample_data.csv
2121
# Runtime stage: Minimal distroless image
2222
FROM gcr.io/distroless/python3-debian12
2323

24-
# Copy virtual environment and application
24+
# Copy Python installation and virtual environment from build stage
25+
COPY --from=build-venv /usr/local /usr/local
2526
COPY --from=build-venv /.venv /.venv
2627
COPY --from=build-venv /app /app
2728

2829
# Copy required runtime libraries for NumPy/Pandas
2930
# These shared libraries are needed to run the compiled extensions
30-
COPY --from=build-venv /usr/lib/x86_64-linux-gnu/libgfortran.so.5* /usr/lib/x86_64-linux-gnu/
31-
COPY --from=build-venv /usr/lib/x86_64-linux-gnu/libopenblas.so.0* /usr/lib/x86_64-linux-gnu/
32-
COPY --from=build-venv /usr/lib/x86_64-linux-gnu/libquadmath.so.0* /usr/lib/x86_64-linux-gnu/
31+
COPY --from=build-venv /usr/lib/*-linux-gnu*/libgfortran.so.5* /usr/lib/
32+
COPY --from=build-venv /usr/lib/*-linux-gnu*/libopenblas.so.0* /usr/lib/
33+
COPY --from=build-venv /usr/lib/*-linux-gnu*/libquadmath.so.0* /usr/lib/
34+
COPY --from=build-venv /usr/lib/*-linux-gnu*/libgcc_s.so.1* /usr/lib/
3335

3436
WORKDIR /app
3537

36-
# Run the analysis script
38+
# Run the analysis script using venv Python
3739
ENTRYPOINT ["/.venv/bin/python3", "-u", "analyze.py"]

0 commit comments

Comments
 (0)