Install FlagScale#
Read Requirements before proceeding.
Setup#
1. Install backends#
Inference / Serving backend#
We recommend using the latest release of flagscale-inference image.
docker pull harbor.baai.ac.cn/flagscale/flagscale-inference:dev-cu128-py3.12-20260302102033
docker run -itd --privileged --gpus all --net=host --ipc=host --device=/dev/infiniband --shm-size 512g --ulimit memlock=-1 --name <name> harbor.baai.ac.cn/flagscale/flagscale-inference:dev-cu128-py3.12-20260302102033
docker exec -it <name> /bin/bash
conda activate flagscale-inference
vLLM:
pip install vllm==0.13.0
vLLM-plugin-FL:
pip install vllm-plugin-fl==0.1.0+vllm0.13.0 --extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple
See more details in vllm-plugin-FL.
FlagGems:
pip install -U scikit-build-core==0.11 pybind11 ninja cmake
git clone https://github.com/flagos-ai/FlagGems
cd FlagGems
pip install --no-build-isolation .
See more details in FlagGems.
Training backend#
We recommend using the latest release of flagscale-train image.
docker pull harbor.baai.ac.cn/flagscale/flagscale-train:dev-cu128-py3.12-20260319182856
docker run -itd --gpus all --shm-size=500g --name <name> harbor.baai.ac.cn/flagscale/flagscale-train:dev-cu128-py3.12-20260319182856 /bin/bash
docker exec -it <name> /bin/bash
conda activate flagscale-train
Megatron-LM-FL:
pip install megatron_core==0.1.0+megatron0.15.0rc7 --extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple
See more details in Megatron-LM-FL.
TransformerEngine-FL:
pip install transformer_engine==0.1.0+te2.9.0 --extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple
See more details in TransformerEngine-FL.
RL backend#
We recommend using the latest release of flagscale-train image.
docker pull harbor.baai.ac.cn/flagscale/flagscale-train:dev-cu128-py3.12-20260319182856
docker run -itd --gpus all --shm-size=500g --name <name> harbor.baai.ac.cn/flagscale/flagscale-train:dev-cu128-py3.12-20260319182856 /bin/bash
docker exec -it <name> /bin/bash
conda activate flagscale-train
verl-FL:
pip install verl==0.1.0+verl0.7.0 --extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple
See more details in veRL-FL to get full installation instructions.
2. Install FlagScale#
Option 1: Install via pip
pip install flagscale --extra-index-url https://resource.flagos.net/repository/flagos-pypi-hosted/simple
Option 2: Install from source
git clone https://github.com/flagos-ai/FlagScale.git
cd FlagScale
pip install .