Skip to content

Commit d5d4397

Browse files
committed
ci: update dockerfiles to include the rust toolchain and libviewer
1 parent 92b633d commit d5d4397

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ assets
1414
**/.pytest_cache
1515
**/.coverage
1616
**/coverage.xml
17+
**/target
18+
**/*.rs.bk
19+
**/.cargo/registry
20+
**/.cargo/git

services/rows/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ RUN apt-get update \
2121
RUN pip install -U pip
2222
RUN pip install "poetry==$POETRY_VERSION"
2323

24+
# Install Rust toolchain and maturin
25+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
26+
&& . $HOME/.cargo/env \
27+
&& pip install maturin \
28+
&& rustc --version \
29+
&& cargo --version
30+
31+
# Add cargo bin dir to PATH (so maturin + cargo available globally)
32+
ENV PATH="/root/.cargo/bin:${PATH}"
33+
2434
WORKDIR /src
2535
COPY services/rows/poetry.lock ./services/rows/poetry.lock
2636
COPY services/rows/pyproject.toml ./services/rows/pyproject.toml
2737
COPY libs/libcommon ./libs/libcommon
2838
COPY libs/libapi ./libs/libapi
39+
COPY libs/libviewer ./libs/libviewer
2940
WORKDIR /src/services/rows/
3041
RUN poetry install --no-cache --no-root
3142
COPY services/rows/src ./src

services/rows/dev.Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,23 @@ RUN apt-get update \
2121
RUN pip install -U pip
2222
RUN pip install "poetry==$POETRY_VERSION"
2323

24+
# Install Rust toolchain and maturin
25+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
26+
&& . $HOME/.cargo/env \
27+
&& pip install maturin \
28+
&& rustc --version \
29+
&& cargo --version
30+
31+
# Add cargo bin dir to PATH (so maturin + cargo available globally)
32+
ENV PATH="/root/.cargo/bin:${PATH}"
33+
2434
WORKDIR /src
2535
COPY libs/libcommon/poetry.lock ./libs/libcommon/poetry.lock
2636
COPY libs/libcommon/pyproject.toml ./libs/libcommon/pyproject.toml
2737
COPY libs/libapi/poetry.lock ./libs/libapi/poetry.lock
2838
COPY libs/libapi/pyproject.toml ./libs/libapi/pyproject.toml
39+
COPY libs/libviewer/poetry.lock ./libs/libviewer/poetry.lock
40+
COPY libs/libviewer/pyproject.toml ./libs/libviewer/pyproject.toml
2941
COPY services/rows/poetry.lock ./services/rows/poetry.lock
3042
COPY services/rows/pyproject.toml ./services/rows/pyproject.toml
3143

0 commit comments

Comments
 (0)