Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8c654c04
Unverified
Commit
8c654c04
authored
Mar 18, 2024
by
Simon Mo
Committed by
GitHub
Mar 18, 2024
Browse files
CI: Add ROCm Docker Build (#2886)
parent
9101d832
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
0 deletions
+44
-0
.buildkite/run-amd-test.sh
.buildkite/run-amd-test.sh
+38
-0
.buildkite/test-template.j2
.buildkite/test-template.j2
+5
-0
requirements-rocm.txt
requirements-rocm.txt
+1
-0
No files found.
.buildkite/run-amd-test.sh
0 → 100644
View file @
8c654c04
# This script build the ROCm docker image and run the API server inside the container.
# It serves a sanity check for compilation and basic model usage.
set
-ex
# Print ROCm version
rocminfo
# Try building the docker image
docker build
-t
rocm
-f
Dockerfile.rocm
.
# Setup cleanup
remove_docker_container
()
{
docker
rm
-f
rocm
||
true
;
}
trap
remove_docker_container EXIT
remove_docker_container
# Run the image
docker run
--device
/dev/kfd
--device
/dev/dri
--network
host
--name
rocm rocm python3
-m
vllm.entrypoints.api_server &
# Wait for the server to start
wait_for_server_to_start
()
{
timeout
=
300
counter
=
0
while
[
"
$(
curl
-s
-o
/dev/null
-w
''
%
{
http_code
}
''
localhost:8000/health
)
"
!=
"200"
]
;
do
sleep
1
counter
=
$((
counter
+
1
))
if
[
$counter
-ge
$timeout
]
;
then
echo
"Timeout after
$timeout
seconds"
break
fi
done
}
wait_for_server_to_start
# Test a simple prompt
curl
-X
POST
-H
"Content-Type: application/json"
\
localhost:8000/generate
\
-d
'{"prompt": "San Francisco is a"}'
.buildkite/test-template.j2
View file @
8c654c04
...
@@ -3,6 +3,11 @@
...
@@ -3,6 +3,11 @@
{% set default_working_dir = "/vllm-workspace/tests" %}
{% set default_working_dir = "/vllm-workspace/tests" %}
steps:
steps:
- label: "AMD Test"
agents:
queue: amd
command: bash .buildkite/run-amd-test.sh
- label: ":docker: build image"
- label: ":docker: build image"
commands:
commands:
- "docker build --build-arg max_jobs=16 --tag {{ docker_image }} --target test --progress plain ."
- "docker build --build-arg max_jobs=16 --tag {{ docker_image }} --target test --progress plain ."
...
...
requirements-rocm.txt
View file @
8c654c04
...
@@ -11,3 +11,4 @@ fastapi
...
@@ -11,3 +11,4 @@ fastapi
uvicorn[standard]
uvicorn[standard]
pydantic >= 2.0 # Required for OpenAI server.
pydantic >= 2.0 # Required for OpenAI server.
prometheus_client >= 0.18.0
prometheus_client >= 0.18.0
outlines == 0.0.34
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment