-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cstrans-df-run: propagate args of the RUN directive
... rather than passing them to a shell interpreter after the transformation: ``` [8/9] STEP 7/13: RUN ["env", "COV_HOST=cspodman", "COVERITY_POSIX_SPAWN_FALLBACK=1", "/opt/cov-sa-2024.3/bin/cov-build", "--dir=/cov", "--append-log", "sh", "-c", "--mount=type=bind,from=build,src=/workspace/dist,target=/workspace/dist --mount=type=cache,target=/root/.cache/pip pip install $(echo dist/*.whl)'[tensorizer]' --verbose"] Coverity Build Capture (64-bit) version 2024.3.0 on Linux 6.9.5-100.fc39.x86_64 x86_64 Internal version numbers: 3b0d073f2b p-2024.3-push-30 sh: --: invalid option ``` Reported-by: Steve Grubb
- Loading branch information
Showing
5 changed files
with
106 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Python cuda base ################################################################# | ||
FROM cuda-base AS python-cuda-base | ||
|
||
ENV VIRTUAL_ENV=/opt/vllm | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
# install cuda and common dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
--mount=type=bind,source=requirements-common.txt,target=requirements-common.txt \ | ||
--mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt \ | ||
pip install \ | ||
-r requirements-cuda.txt | ||
|
||
## Development ################################################################# | ||
FROM python-cuda-base AS dev | ||
|
||
# install build and runtime dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
--mount=type=bind,source=requirements-common.txt,target=requirements-common.txt \ | ||
--mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt \ | ||
--mount=type=bind,source=requirements-dev.txt,target=requirements-dev.txt \ | ||
--mount=type=bind,source=requirements-lint.txt,target=requirements-lint.txt \ | ||
--mount=type=bind,source=requirements-test.txt,target=requirements-test.txt \ | ||
pip3 install \ | ||
-r requirements-cuda.txt \ | ||
-r requirements-dev.txt | ||
|
||
## Builder ##################################################################### | ||
FROM dev AS build | ||
|
||
# install build dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
--mount=type=bind,source=requirements-build.txt,target=requirements-build.txt \ | ||
pip install -r requirements-build.txt | ||
|
||
# install compiler cache to speed up compilation leveraging local or remote caching | ||
# git is required for the cutlass kernels | ||
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && rpm -ql epel-release && microdnf install -y git ccache && microdnf clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Python cuda base ################################################################# | ||
FROM cuda-base AS python-cuda-base | ||
|
||
ENV VIRTUAL_ENV=/opt/vllm | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
# install cuda and common dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-common.txt,target=requirements-common.txt --mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt ["/opt/cov-sa-2019.09/bin/cov-build", "--dir=/cov", "--append-log", "sh", "-c", "pip install -r requirements-cuda.txt"] | ||
|
||
## Development ################################################################# | ||
FROM python-cuda-base AS dev | ||
|
||
# install build and runtime dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-common.txt,target=requirements-common.txt --mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt --mount=type=bind,source=requirements-dev.txt,target=requirements-dev.txt --mount=type=bind,source=requirements-lint.txt,target=requirements-lint.txt --mount=type=bind,source=requirements-test.txt,target=requirements-test.txt ["/opt/cov-sa-2019.09/bin/cov-build", "--dir=/cov", "--append-log", "sh", "-c", "pip3 install -r requirements-cuda.txt -r requirements-dev.txt"] | ||
|
||
## Builder ##################################################################### | ||
FROM dev AS build | ||
|
||
# install build dependencies | ||
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-build.txt,target=requirements-build.txt ["/opt/cov-sa-2019.09/bin/cov-build", "--dir=/cov", "--append-log", "sh", "-c", "pip install -r requirements-build.txt"] | ||
|
||
# install compiler cache to speed up compilation leveraging local or remote caching | ||
# git is required for the cutlass kernels | ||
RUN ["/opt/cov-sa-2019.09/bin/cov-build", "--dir=/cov", "--append-log", "sh", "-c", "rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && rpm -ql epel-release && microdnf install -y git ccache && microdnf clean all"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/zsh | ||
Check failure Code scanning / shellcheck SC1071 Error test
ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!
|
||
set -exo pipefail | ||
|
||
TEST_ARGS=(-- /opt/cov-sa-2019.09/bin/cov-build --dir=/cov --append-log) | ||
|
||
# set path to project root | ||
PROJECT_ROOT="../.." | ||
|
||
if [[ $# -eq 0 ]]; then | ||
tests=( *-stdin.txt ) | ||
else | ||
tests=( "$@" ) | ||
fi | ||
|
||
for tst in "${tests[@]}"; do | ||
tst=${tst%-stdin.txt} | ||
${PROJECT_ROOT}/csdiff_build/src/cstrans-df-run \ | ||
${TEST_ARGS[@]} \ | ||
< ${tst}-stdin.txt \ | ||
> ${tst}-stdout.txt | ||
done |