-
Notifications
You must be signed in to change notification settings - Fork 284
fix dockerfile #1107
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
fix dockerfile #1107
Conversation
Summary of ChangesHello @hiworldwzj, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refining the dependency installation process within the CUDA 12.8.0 Docker environments. The changes aim to enhance build efficiency by utilizing Docker's build cache for pip installations and ensuring that PyTorch-related dependencies are fetched from the correct index URL tailored for CUDA 12.8.0, thereby improving the reliability and speed of Docker image creation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates several Dockerfiles to modify the pip install command for Python dependencies. The changes introduce build caching for pip, which is a good improvement for build times. However, a critical issue has been introduced in all modified Dockerfiles: the --extra-index-url for PyTorch points to a non-existent wheel index (cu128 or cu124). This will cause the Docker builds to fail. I've provided suggestions to correct these URLs to the proper index for CUDA 12.x, which is cu121.
| COPY ./requirements.txt /lightllm/requirements.txt | ||
| RUN pip install -U pip | ||
| RUN pip install -r /lightllm/requirements.txt --no-cache-dir | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PyTorch wheel index URL https://download.pytorch.org/whl/cu128 appears to be incorrect. The cu128 index for PyTorch wheels does not exist, which will cause the Docker build to fail. For CUDA 12.x compatible PyTorch versions, the correct index is cu121. Please update the URL to use the correct index.
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu121
| COPY ./requirements.txt /lightllm/requirements.txt | ||
| RUN pip install -U pip | ||
| RUN pip install -r /lightllm/requirements.txt --no-cache-dir | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PyTorch wheel index URL https://download.pytorch.org/whl/cu128 appears to be incorrect. The cu128 index for PyTorch wheels does not exist, which will cause the Docker build to fail. For CUDA 12.x compatible PyTorch versions, the correct index is cu121. Please update the URL to use the correct index.
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu121
|
|
||
| COPY ./requirements.txt /lightllm/requirements.txt | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu124 | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PyTorch wheel index URL has been updated from cu124 to cu128, but both https://download.pytorch.org/whl/cu124 and https://download.pytorch.org/whl/cu128 appear to be incorrect. Neither of these indices for PyTorch wheels exist, which will cause the Docker build to fail. For CUDA 12.x compatible PyTorch versions, the correct index is cu121. Please update the URL to use the correct index.
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu121
|
|
||
| COPY ./requirements.txt /lightllm/requirements.txt | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu124 | ||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PyTorch wheel index URL has been updated from cu124 to cu128, but both https://download.pytorch.org/whl/cu124 and https://download.pytorch.org/whl/cu128 appear to be incorrect. Neither of these indices for PyTorch wheels exist, which will cause the Docker build to fail. For CUDA 12.x compatible PyTorch versions, the correct index is cu121. Please update the URL to use the correct index.
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /lightllm/requirements.txt --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu121
No description provided.