Option 2: Build Docker Image with Model Inside
To build an image with the model baked in, you must specify the following docker arguments when building the image.
Prerequisites
RunPod Account
Docker
Arguments:
Required
MODEL_NAME
Optional
MODEL_BASE_PATH: Defaults to /runpod-volume for network storage. Use /models or for local container storage.
QUANTIZATION
WORKER_CUDA_VERSION: 11.8.0 or 12.1.0 (default: 11.8.0 due to a small amount of workers not having CUDA 12.1 support yet. 12.1.0 is recommended for optimal performance).
For the remaining settings, you may apply them as environment variables when running the container. Supported environment variables are listed in the Environment Variables section.
Example: Building an image with OpenChat-3.5
sudo docker build -t username/image:tag --build-arg MODEL_NAME="openchat/openchat_3.5" --build-arg MODEL_BASE_PATH="/models" .