TinyZero Docker & Self-Hosted Deployment

GitHub

Minimal reproduction of DeepSeek R1-Zero

13,257 stars Python Python 26 files ยท ~28,236 tokens
1. Pull Image (DOCKERHUB) docker pull Jiayi-Pan/TinyZero:latest
2. Docker Run (1-Click Launch) docker run -d --name tinyzero --restart always jiayi-pan/tinyzero:latest
3. Podman Run podman run -d --name tinyzero --restart always jiayi-pan/tinyzero:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/jiayi-pan/tinyzero:latest
5. ORAS Pull (OCI Artifact) oras pull jiayi-pan/tinyzero:latest
docker/Dockerfile.ngc.vllm
FROM nvcr.io/nvidia/pytorch:24.05-py3

# uninstall nv-pytorch fork
RUN pip3 uninstall pytorch-quantization \
     pytorch-triton \
     torch \
     torch-tensorrt \
     torchvision \
     xgboost transformer_engine flash_attn \
     apex megatron-core -y

RUN pip3 install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124

# make sure torch version is kept
RUN pip3 install --no-cache-dir \
    "torch==2.4.0" \
    accelerate \
    codetiming \
    datasets \
    dill \
    hydra-core \
    numpy \
    pybind11 \
    tensordict \
    "transformers<=4.46.0"

# ray is installed via vllm
RUN pip3 install --no-cache-dir vllm==0.6.3

# we choose flash-attn v2.7.0 or v2.7.2 which contain pre-built wheels
RUN pip3 install --no-cache-dir --no-build-isolation flash-attn==2.7.0.post2

# install apex, set MAX_JOBS to avoid OOMs
RUN MAX_JOBS=4 pip3 install -v --disable-pip-version-check --no-cache-dir --no-build-isolation \
    --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" \
    git+https://github.com/NVIDIA/apex

# install Transformer Engine, which requires FA 2.5.8
RUN MAX_JOBS=4 NINJA_FLAGS="-j4" pip3 install flash-attn==2.5.8 --no-cache-dir --no-build-isolation
RUN MAX_JOBS=4 NINJA_FLAGS="-j4" pip3 install git+https://github.com/NVIDIA/[email protected]

# Pin wandb to v0.18 since v0.19.1 is released with ImportError
RUN pip3 install wandb==0.18.7 py-spy