Learn how to extend official Runpod templates to create your own Pod templates.
pip install
again after Pod restarts.
/start.sh
script that handles Pod initialization.CMD
or ENTRYPOINT
in the Dockerfile. Runpod base images include a carefully configured startup script (/start.sh
) that handles Pod initialization, SSH setup, and service startup. Overriding this can break Pod functionality.
rm -rf /var/lib/apt/lists/*
after installing system packages to reduce image size.download_model.py
in the same directory as your Dockerfile:--platform=linux/amd64
flag is crucial for Runpod compatibility. Runpod’s infrastructure requires AMD64 architecture images.YOUR_USERNAME
with your Docker Hub username):docker login
first and enter your Docker Hub credentials.YOUR_USERNAME/my-custom-template:latest
)./workspace
.8888
for JupyterLab access.22
if you need SSH access.HUGGINGFACE_HUB_CACHE
/workspace/hf_cache
startup.sh
file in your project directory:--platform=linux/amd64
when building..dockerignore
to exclude unnecessary files from your build context.v1.0.0
) instead of just latest
.