Skip to content

Commit 359ca42

Browse files
committed
Updated Dockerfile
1 parent 97906d8 commit 359ca42

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,26 @@ RUN dnf update -y && \
2020
&& dnf clean all
2121

2222
# Create build user
23-
RUN groupadd -r builder && useradd -r -g builder builder
23+
RUN groupadd -r builder && useradd -r -g builder -m builder
2424

2525
# Set up build environment
2626
WORKDIR /build
2727
RUN chown builder:builder /build
2828
USER builder
2929

3030
# Copy source files
31-
COPY --chown=builder:builder pyproject.toml README.md LICENSE ./
31+
#COPY --chown=builder:builder pyproject.toml README.md LICENSE ./
32+
COPY --chown=builder:builder pyproject.toml LICENSE ./
3233
COPY --chown=builder:builder src/ src/
3334
COPY --chown=builder:builder tests/ tests/
34-
COPY --chown=builder:builder .git/ .git/
3535

3636
# Install Python dependencies and build the package
37-
RUN python3 -m pip install --user --upgrade pip setuptools wheel build && \
38-
python3 -m pip install --user numpy pandas matplotlib scikit-learn scipy && \
39-
python3 -m pip install --user -e .[dev] && \
40-
python3 -m pytest --log-cli-level=DEBUG && \
41-
python3 -m build --wheel
37+
RUN python3 -m pip install --user --upgrade pip setuptools wheel build
38+
RUN python3 -m pip install --user numpy pandas matplotlib scikit-learn scipy
39+
ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TALKPIPE=0.1.0
40+
RUN python3 -m pip install --user -e .[dev]
41+
RUN python3 -m pytest --log-cli-level=DEBUG
42+
RUN python3 -m build --wheel
4243

4344
# Stage 2: Runtime stage with minimal dependencies
4445
FROM fedora:latest AS runtime
@@ -73,7 +74,7 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip && \
7374
rm -f /tmp/*.whl
7475

7576
# Copy only necessary runtime files
76-
COPY --chown=app:app pyproject.toml README.md LICENSE ./
77+
COPY --chown=app:app pyproject.toml ./
7778

7879
# Create data volume mount point
7980
VOLUME ["/app/data"]

0 commit comments

Comments
 (0)