[PR #1306] [CLOSED] Fix Docker image not using GPU #36417

Closed
opened 2026-04-22 21:04:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1306
Author: @bwest2397
Created: 11/28/2023
Status: Closed

Base: mainHead: fix-docker-image-not-using-gpu


📝 Commits (2)

  • 7db4c93 Dockerfile: Use CUDA base image for final image
  • 30e87fe Use named stages in Dockerfile

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 Dockerfile (+3 -3)

📄 Description

As it currently stands, the Docker image that gets built is seemingly unable to use the GPU despite the initial "build" stage of the Dockerfile ostensibly being built with CUDA support (i.e. built using the nvidia/cuda base image). As reported in https://github.com/jmorganca/ollama/issues/797, it seems that simply setting the second stage of the Dockerfile to use this same nvidia/cuda base image resolves the problem.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/1306 **Author:** [@bwest2397](https://github.com/bwest2397) **Created:** 11/28/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-docker-image-not-using-gpu` --- ### 📝 Commits (2) - [`7db4c93`](https://github.com/ollama/ollama/commit/7db4c9382002bce3966424dcc6c2567e4c909844) Dockerfile: Use CUDA base image for final image - [`30e87fe`](https://github.com/ollama/ollama/commit/30e87fee44981a5a708173268568f9a4309559c3) Use named stages in Dockerfile ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+3 -3) </details> ### 📄 Description As it currently stands, the Docker image that gets built is seemingly unable to use the GPU despite the initial "build" stage of the Dockerfile ostensibly being built with CUDA support (i.e. built using the `nvidia/cuda` base image). As reported in https://github.com/jmorganca/ollama/issues/797, it seems that simply setting the second stage of the Dockerfile to use this same `nvidia/cuda` base image resolves the problem. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 21:04:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#36417