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
OpenDAS
Lmdeploy
Commits
e5bfd387
Unverified
Commit
e5bfd387
authored
Aug 23, 2023
by
RunningLeon
Committed by
GitHub
Aug 23, 2023
Browse files
Change to github-hosted runner for building docker image (#291)
* change to github runner * update
parent
9e366482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
.github/workflows/docker.yml
.github/workflows/docker.yml
+17
-6
docker/Dockerfile
docker/Dockerfile
+2
-3
No files found.
.github/workflows/docker.yml
View file @
e5bfd387
...
...
@@ -3,6 +3,7 @@ name: publish-docker
on
:
push
:
paths-ignore
:
-
"
!.github/workflows/docker.yml"
-
"
.github/**"
-
"
docs/**"
-
"
resources/**"
...
...
@@ -16,23 +17,33 @@ on:
jobs
:
publish_docker_image
:
runs-on
:
[
self-hosted
,
linux-3090
]
runs-on
:
ubuntu-latest
environment
:
'
prod'
env
:
TAG_PREFIX
:
"
openmmlab/lmdeploy"
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v3
-
name
:
Get lmdeploy commit id
-
name
:
Check disk space
run
:
|
export commit_id=$(git log --format="%H" -n 1)
echo "commit id = $commit_id"
echo "COMMIT_ID=$commit_id" >> $GITHUB_ENV
rm -rf ${GITHUB_WORKSPACE}/.git
cat /proc/cpuinfo | grep -ic proc
free
df -h
df . -h
-
name
:
Get docker info
run
:
|
docker info
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v2
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
-
name
:
Build and push the latest Docker image
run
:
|
export TAG=$TAG_PREFIX:latest
echo $TAG
docker build docker/ -t ${TAG} --
build-arg COMMIT_ID=${COMMIT_ID}
docker build docker/ -t ${TAG} --
no-cache
docker push $TAG
echo "TAG=${TAG}" >> $GITHUB_ENV
-
name
:
Push docker image with released tag
...
...
docker/Dockerfile
View file @
e5bfd387
...
...
@@ -9,11 +9,10 @@ RUN python3 -m pip install --no-cache-dir cmake
ENV
NCCL_LAUNCH_MODE=GROUP
ARG
COMMIT_ID
=main
ARG
VERSION
=main
RUN
git clone
--depth
=
1 https://github.com/InternLM/lmdeploy.git
&&
\
RUN
git clone
--depth
=
1
--branch
=
${
VERSION
}
https://github.com/InternLM/lmdeploy.git
&&
\
cd
lmdeploy
&&
\
git checkout
${
COMMIT_ID
}
&&
\
python3
-m
pip
install
--no-cache-dir
-r
requirements.txt
&&
\
mkdir
-p
build
&&
cd
build
&&
\
cmake ..
\
...
...
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