28 lines
790 B
Docker
28 lines
790 B
Docker
# Base image
|
|
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
|
|
|
|
# Use bash shell with pipefail option
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
# Set the working directory
|
|
WORKDIR /
|
|
|
|
# Update and upgrade the system packages (Worker Template)
|
|
COPY builder/setup.sh /setup.sh
|
|
RUN chmod +x /setup.sh && \
|
|
/setup.sh && \
|
|
rm /setup.sh
|
|
|
|
# Install Python dependencies (Worker Template)
|
|
COPY builder/requirements.txt /requirements.txt
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
pip install --upgrade pip && \
|
|
pip install --upgrade -r /requirements.txt --no-cache-dir && \
|
|
rm /requirements.txt
|
|
|
|
# Add src files (Worker Template)
|
|
ADD src .
|
|
|
|
CMD python -m vllm.entrypoints.openai.api_server --model facebook/opt-125m --port 443 --host 127.0.0.1
|
|
CMD python -u /handler.py
|