Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
fb107cfd
Unverified
Commit
fb107cfd
authored
Aug 23, 2025
by
gongwei-130
Committed by
GitHub
Aug 23, 2025
Browse files
feat: allow use local branch to build image (#9546)
parent
97a38ee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
docker/Dockerfile
docker/Dockerfile
+15
-3
No files found.
docker/Dockerfile
View file @
fb107cfd
ARG
CUDA_VERSION=12.6.1
FROM
nvidia/cuda:${CUDA_VERSION}-cudnn-devel-ubuntu22.04
FROM
nvidia/cuda:${CUDA_VERSION}-cudnn-devel-ubuntu22.04
as base
ARG
BUILD_TYPE=all
ARG
BRANCH_TYPE=remote
ARG
DEEPEP_COMMIT=b92d0d4860ce6866cd6d31bfbae937f9a7a3772b
ARG
CMAKE_BUILD_PARALLEL_LEVEL=2
ENV
DEBIAN_FRONTEND=noninteractive \
...
...
@@ -58,10 +59,21 @@ RUN mkdir -p /tmp/gdrcopy && cd /tmp \
# Fix DeepEP IBGDA symlink
RUN
ln
-sf
/usr/lib/x86_64-linux-gnu/libmlx5.so.1 /usr/lib/x86_64-linux-gnu/libmlx5.so
# Clone and install SGLang
FROM
scratch AS local_src
COPY
. /src
FROM
base AS build-image
# Install SGLang
WORKDIR
/sgl-workspace
ARG
BRANCH_TYPE
COPY
--from=local_src /src /tmp/local_src
RUN if
[
"
$BRANCH_TYPE
"
=
"local"
]
;
then
\
cp
-r
/tmp/local_src /sgl-workspace/sglang
;
\
else
\
git clone
--depth
=
1 https://github.com/sgl-project/sglang.git /sgl-workspace/sglang
;
\
fi
\
&&
rm
-rf
/tmp/local_src
RUN
python3
-m
pip
install
--no-cache-dir
--upgrade
pip setuptools wheel html5lib six
\
&&
git clone
--depth
=
1 https://github.com/sgl-project/sglang.git
\
&&
cd
sglang
\
&&
case
"
$CUDA_VERSION
"
in
\
12.6.1
)
CUINDEX
=
126
;;
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment