Guide to Custom Images
Deployment Overview
graph TD
A[Prepare Environment] --> B[Create Dockerfile]
B --> C[Build Custom Image]
C --> D[Test Locally]
D --> E[Push to Docker Hub]
E --> F[Pull Image on Yottalabs as Templates]
F --> G[Run in pods]
G --> H[✅ Deployment Complete]Step-by-step Guide
1
2
Create Dockerfile
# Create Dockerfile and edit it.
nano Dockerfile# take vllm just as an example here. Replace this line with any image you prefer. Find them on Dockerhub and please keep the formats right ↓
# vllm / vllm-openai : latest
# <organize/user> / <image-name> : <tag>
# In most cases, you can simply find official images on Dockerhub as base.
FROM vllm/vllm-openai:latest
# Set environment to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install OpenSSH server for optional SSH access
# Important! Please don't skip this in order to make sure you have proper ssh connection on our platform.
RUN apt-get update \
&& apt-get install -y openssh-server \
&& apt-get clean \
&& mkdir -p /run/sshd \
&& chmod 755 /run/sshd
# Expose ports for API and SSH
# Port 22 is ALWAYS necessary.
# For which other ports you expose, check the official docs of your project.
EXPOSE 22 <other-ports-you-want-to-expose>
# Example for vllm:
EXPOSE 22 80003
4
Test Local Run
# Run with GPU support
docker run --gpus all -d -p 8000:8000 <image-name>:<tag>
# Or if you use CPU
docker run -d -p 8000:8000 <image-name>:<tag>
# Example:
docker run --gpus all -d -p 8000:8000 custom:latest
# Check container status
docker ps
# View logs
docker logs -f $(docker ps -q)5
7
Verification & Testing
# Replace with your Yottalabs server IP
SERVER_IP="12.34.56.78"
# Test connectivity
curl http://$SERVER_IP:8000/v1/models
# Test full API
curl http://$SERVER_IP:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-0.6B",
"messages": [
{"role": "user", "content": "What is the capital of France?"}
],
"max_tokens": 100
}'{
"object": "list",
"data": [
{
"id": "Qwen/Qwen3-0.6B",
"object": "model",
"created": 1768965066,
"owned_by": "vllm",
"root": "Qwen/Qwen3-0.6B",
"parent": null,
"max_model_len": 40960,
"permission": [...]
}
]
}Additional Resources
Last updated
Was this helpful?