File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
15
15
apt-get install -y nodejs
16
16
17
17
# Install Rust
18
- RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
19
- . $HOME/ .cargo/env
18
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
19
+ ENV PATH="/root/ .cargo/bin:${PATH}"
20
20
21
21
# Markdown
22
22
RUN npm install -g markdownlint-cli
Original file line number Diff line number Diff line change @@ -23,16 +23,21 @@ precommit-check:
23
23
24
24
# Run pre-commit hooks in a Docker container
25
25
# and you can exec container to run bash for debug.
26
+ # export PRECOMMIT_CONTAINER=ghcr.io/vllm-project/semantic-router/precommit:latest
26
27
# docker run --rm -it \
27
- # -v $(shell pwd):/app \
28
- # --name precommit-container ${PRECOMMIT_CONTAINER} \
29
- # cd /app &&
30
- # bash
28
+ # -v $(pwd):/app \
29
+ # -w /app \
30
+ # --name precommit-container ${PRECOMMIT_CONTAINER} \
31
+ # bash
31
32
precommit-local :
32
- docker pull ${PRECOMMIT_CONTAINER}
33
+ @if ! docker image inspect ${PRECOMMIT_CONTAINER} > /dev/null 2>&1 ; then \
34
+ echo " Image not found locally. Pulling..." ; \
35
+ docker pull ${PRECOMMIT_CONTAINER} ; \
36
+ else \
37
+ echo " Image found locally. Skipping pull." ; \
38
+ fi
33
39
docker run --rm \
34
- -v $(pwd ) :/app \
35
- --name precommit-container ${PRECOMMIT_CONTAINER}
36
- cd /app && \
37
- pre-commit install && \
38
- pre-commit run --all-files
40
+ -v $(pwd ) :/app \
41
+ -w /app \
42
+ --name precommit-container ${PRECOMMIT_CONTAINER} \
43
+ bash -c " pre-commit install && pre-commit run --all-files"
You can’t perform that action at this time.
0 commit comments