-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b40b7c7
Showing
3 changed files
with
127 additions
and
0 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,59 @@ | ||
name: Build image | ||
on: | ||
push: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Generate tags and labels | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Check Free Space 0 | ||
run: | | ||
echo "Free space:" | ||
df -h | ||
- name: Prune builder | ||
run: | | ||
docker image prune -a -f | ||
docker container prune -f | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Check Free Space 1 | ||
run: | | ||
echo "Free space:" | ||
df -h | ||
- name: Build and push image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,35 @@ | ||
|
||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update -y && \ | ||
apt-get -qq install -y --no-install-recommends \ | ||
git \ | ||
curl \ | ||
rsync \ | ||
unzip \ | ||
less \ | ||
vim \ | ||
gnupg \ | ||
htop \ | ||
openssh-client \ | ||
p7zip \ | ||
apt-utils \ | ||
jq \ | ||
p7zip-full \ | ||
ca-certificates \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* \ | ||
&& update-ca-certificates | ||
|
||
# Install Miniforge3 (mamba-based open miniconda) | ||
ARG MFURL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" | ||
|
||
RUN curl -L -o /tmp/Miniforge3.sh "${MFURL}" && \ | ||
bash /tmp/Miniforge3.sh -b -p /opt/conda && \ | ||
rm -f /tmp/Miniforge3.sh | ||
|
||
COPY vllm-environment.yml /root/vllm-environment.yml | ||
|
||
RUN . /opt/conda/bin/activate && \ | ||
mamba env create -p /opt/vllm -f /root/vllm-environment.yml | ||
|
||
CMD echo 'Hint: /opt/conda/bin/conda run -p /opt/vllm python -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 8000 --model gpt2' |
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: /opt/vllm | ||
channels: | ||
- xformers/label/dev | ||
- pytorch | ||
- nvidia/label/cuda-11.8.0 | ||
- conda-forge | ||
dependencies: | ||
- accelerate | ||
- cuda-minimal-build=11.8.0=0 | ||
- cuda-toolkit=11.8.0=0 | ||
- cuda-version=11.8 | ||
- diskcache | ||
- fastapi | ||
- numpy | ||
- pandas | ||
- pip | ||
- psutil | ||
- pyarrow | ||
- pydantic<2 | ||
- python=3.10.* | ||
- pytorch=2.1.0 | ||
- pytorch-cuda=11.8 | ||
- sentencepiece | ||
- torchvision | ||
- transformers | ||
- typing_extensions | ||
- uvicorn | ||
- xformers | ||
- pip: | ||
- fschat | ||
- ninja | ||
- ray | ||
- vllm==0.2.0 |