Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update base image to support cuda12.4 in dockerfile #2182

Merged
merged 7 commits into from
Aug 2, 2024

Conversation

RunningLeon
Copy link
Collaborator

@RunningLeon RunningLeon commented Jul 30, 2024

Motivation

update base image to cuda12.4

requested in #2164

Modification

Change dockerfile base image and support cu118 and cu124

build cu12

cd ~/lmdeploy
docker build . -f docker/Dockerfile -t lmdeploy:cu12 --build-arg CUDA_VERSION=cu12

build cu11

cd ~/lmdeploy
docker build . -f docker/Dockerfile -t lmdeploy:cu11 --build-arg CUDA_VERSION=cu11

docker build ci example

https://github.com/RunningLeon/lmdeploy/actions/runs/10211052906

image

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

docker/Dockerfile Outdated Show resolved Hide resolved
@RunningLeon RunningLeon changed the title update base image to cuda12.4 update base image to support cuda12.4 in dockerfile Jul 31, 2024
@lvhan028 lvhan028 requested a review from zhulinJulia24 July 31, 2024 12:05
@lvhan028
Copy link
Collaborator

In the build-docker workflow, can we build openmmlab/lmdeploy:{version}-cu11 and openmmlab/lmdeploy:{version}-cu12

@zhulinJulia24
Copy link
Collaborator

zhulinJulia24 commented Jul 31, 2024

by using image nvidia/cuda:12.4.1-devel-ubuntu22.04

leads to error like:
python3 -m pip cache dir
/usr/bin/python3: No module named pip

@RunningLeon
Copy link
Collaborator Author

by using image nvidia/cuda:12.4.1-devel-ubuntu22.04

leads to error like: python3 -m pip cache dir /usr/bin/python3: No module named pip

run it install python and create python venv

RUN rm /etc/apt/sources.list.d/cuda*.list && apt-get update -y && apt-get install -y software-properties-common wget vim &&\
    add-apt-repository ppa:deadsnakes/ppa -y && apt-get update -y && apt-get install -y --no-install-recommends \
    rapidjson-dev libgoogle-glog-dev gdb python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
    && apt-get clean -y && rm -rf /var/lib/apt/lists/* && cd /opt && python3 -m venv py3

ENV PATH=/opt/py3/bin:$PATH

@RunningLeon
Copy link
Collaborator Author

In the build-docker workflow, can we build openmmlab/lmdeploy:{version}-cu11 and openmmlab/lmdeploy:{version}-cu12

ok,

@zhulinJulia24
Copy link
Collaborator

by using image nvidia/cuda:12.4.1-devel-ubuntu22.04
leads to error like: python3 -m pip cache dir /usr/bin/python3: No module named pip

run it install python and create python venv

RUN rm /etc/apt/sources.list.d/cuda*.list && apt-get update -y && apt-get install -y software-properties-common wget vim &&\
    add-apt-repository ppa:deadsnakes/ppa -y && apt-get update -y && apt-get install -y --no-install-recommends \
    rapidjson-dev libgoogle-glog-dev gdb python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
    && apt-get clean -y && rm -rf /var/lib/apt/lists/* && cd /opt && python3 -m venv py3

ENV PATH=/opt/py3/bin:$PATH

env path is not set, fixed

Copy link
Collaborator

@lvhan028 lvhan028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

docker/Dockerfile Outdated Show resolved Hide resolved
Co-authored-by: achraf-mer <51244975+achraf-mer@users.noreply.github.com>
docker/Dockerfile Outdated Show resolved Hide resolved
Copy link
Collaborator

@zhulinJulia24 zhulinJulia24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lvhan028 lvhan028 merged commit 50489cb into InternLM:main Aug 2, 2024
3 checks passed
achraf-mer added a commit to h2oai/lmdeploy that referenced this pull request Aug 8, 2024
* update

* support cu118 in dockerfile

* update ci docker

* update

* unlock triton

* Update docker/Dockerfile

Co-authored-by: achraf-mer <51244975+achraf-mer@users.noreply.github.com>

* update build script

---------

Co-authored-by: achraf-mer <51244975+achraf-mer@users.noreply.github.com>
achraf-mer added a commit to h2oai/lmdeploy that referenced this pull request Aug 9, 2024
update base image to support cuda12.4 in dockerfile (InternLM#2182)
@RunningLeon RunningLeon deleted the update-dockerfile branch December 17, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants