Skip to content

Commit

Permalink
[CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Apr 17, 2024
1 parent e5b71da commit 327df99
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
15 changes: 4 additions & 11 deletions servers/cogvlm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ENV ARTIFACTS_PATH=/app/artifacts
ENV STORAGE_PATH=/app/storage
ENV HF_HUB_ENABLE_HF_TRANSFER=True


# Set the working directory to the root
WORKDIR /

Expand All @@ -26,20 +25,14 @@ COPY requirements.txt .
# Install Python dependencies from requirements.txt
RUN python3.10 -m pip install -r requirements.txt

# Adjust the working directory to where your application's code will reside
WORKDIR /swarms-cloud/servers/cogvlm

# Copy the application's entire directory structure into the container
COPY . /swarms-cloud

# Copy the entrypoint script into the container
COPY scripts/entry_point.sh /entry_point.sh

# Make the entrypoint script executable
RUN chmod +x /entry_point.sh
# Set the working directory to the cogvlm directory
WORKDIR /swarms-cloud/servers/cogvlm

# Expose the port the app runs on
EXPOSE 8000

# Use the entrypoint script to configure environment variables and start the application
ENTRYPOINT ["/entry_point.sh"]
# Run the cogvlm.py file as a Uvicorn server on port 8000
CMD ["uvicorn", "cogvlm:app", "--host", "0.0.0.0", "--port", "8000"]
24 changes: 24 additions & 0 deletions servers/vllm_llm/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ttv-deployment
spec:
replicas: 3
selector:
matchLabels:
app: ttv
template:
metadata:
labels:
app: ttv
spec:
containers:
- name: ttv
image: ttv
resources:
limits:
nvidia.com/gpu: 1
autoscale:
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80
10 changes: 2 additions & 8 deletions servers/vllm_llm/sky_serve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,7 @@ resources:
# workdir: ~/swarms-cloud/servers/cogvlm

setup: |
conda create -n vllm python=3.9 -y
conda activate vllm
pip install vllm
docker build -t ttv .
run: |
conda activate vllm
python -m vllm.entrypoints.openai.api_server \
--tensor-parallel-size $SKYPILOT_NUM_GPUS_PER_NODE \
--host 0.0.0.0 --port 8080 \
--model mistralai/Mixtral-8x7B-Instruct-v0.1
docker run ttv

0 comments on commit 327df99

Please sign in to comment.