This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Allowed generating docker image for both nightly and release 2. Removed build part, only installed wheels directly from nm pypi 3. Updated workflow files to automate the docker image generation --------- Co-authored-by: dhuangnm <dhuang@MacBook-Pro-2.local> Co-authored-by: dhuangnm <dhuang@ip-192-168-198-30.ec2.internal>
- Loading branch information
1 parent
fec3563
commit bd14cbd
Showing
4 changed files
with
129 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build docker image | ||
description: 'build docker image for nm-vllm' | ||
inputs: | ||
docker_tag: | ||
description: "tag to be used for the docker image" | ||
type: string | ||
required: true | ||
build_type: | ||
description: "type of nm-vllm to install for the docker image: nightly (default) or release" | ||
type: string | ||
default: 'nightly' | ||
build_version: | ||
description: "version of nm-vllm to install for the docker image: latest (default) or specific version e.g. 0.4.0, 0.4.0.20240531" | ||
type: string | ||
default: 'latest' | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
# clean up | ||
docker stop $(docker ps -a -q) || echo 'no container to stop' | ||
docker rm $(docker ps -a -q) || echo 'no container to remove' | ||
docker rmi -f $(docker images -aq) || echo 'no image to remove' | ||
docker system prune --all --force | ||
# build | ||
docker build --tag ghcr.io/neuralmagic/nm-vllm-openai:${{ inputs.docker_tag }} \ | ||
--build-arg build_type=${{ inputs.build_type }} \ | ||
--build-arg build_version=${{ inputs.build_version }} \ | ||
--target vllm-openai . || status=$? | ||
echo "status=${status}" >> $GITHUB_OUTPUT | ||
echo "status=${status}" | ||
exit ${status} | ||
shell: bash |
20 changes: 20 additions & 0 deletions
20
.github/actions/nm-setup-nvidia-container-toolkit/action.yml
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,20 @@ | ||
name: set up nvidia-container-toolkit for docker | ||
description: 'sets up nvidia-container-toolkit for docker' | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
# install nvidia-container-toolkit | ||
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ | ||
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ | ||
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ | ||
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list | ||
sudo sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list | ||
sudo killall apt apt-get || echo 'no apt or apt-get process to kill' | ||
sudo apt-get update | ||
sudo apt-get install -y nvidia-container-toolkit | ||
# config and restart docker | ||
sudo systemctl stop docker | ||
sudo nvidia-ctk runtime configure --runtime=docker | ||
sudo systemctl start docker | ||
shell: bash |
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